-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parent selector not working #211
Comments
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. |
Try more up to date version from master. |
Thanks @gabeblackbeard for the If anyone of the GSS team is listening, this needs to be adressed in the documentation. |
When I use the code below
#thing
get a width of 0.But when I reference
#content
directly#thing
gets a width of 800 as expected.What am I missing? Why doesn't the first code work?
The text was updated successfully, but these errors were encountered: