You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there. I figure you probably found a way around this issue by now, but I'll leave here the solution I've found nonetheless, as maybe it will help others.
For some reason, if you are writing your code inside a separate file that is linked by the html page, your whole nesting must be done inside a "body" selector. Like this:
If you do it like that, child-div's width will successfully refer to parent-div's width. Otherwise it seems it will refer to (I believe) the document's width.
If your code is in a style tag in the head of the html page, however, no "body" selector is necessary; your code would have worked as is.
I have no idea what causes this behavior, but there it is. Maybe someone will shed a better light on why it works like that.
Activity
[-]Constraint works as standalone but not in ruleset,[/-][+]Parent selector not working[/+]gabeblackbeard commentedon Jul 28, 2016
Hey there. I figure you probably found a way around this issue by now, but I'll leave here the solution I've found nonetheless, as maybe it will help others.
For some reason, if you are writing your code inside a separate file that is linked by the html page, your whole nesting must be done inside a "body" selector. Like this:
If you do it like that, child-div's width will successfully refer to parent-div's width. Otherwise it seems it will refer to (I believe) the document's width.
If your code is in a style tag in the head of the html page, however, no "body" selector is necessary; your code would have worked as is.
I have no idea what causes this behavior, but there it is. Maybe someone will shed a better light on why it works like that.
Inviz commentedon Jul 30, 2016
Try more up to date version from master.
H-s-O commentedon Nov 11, 2016
Thanks @gabeblackbeard for the
bodyselector tip !If anyone of the GSS team is listening, this needs to be adressed in the documentation.