Created
July 19, 2013 21:17
-
-
Save pfulton/6042418 to your computer and use it in GitHub Desktop.
Compass Selector Helpers: Nest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul li ul li.parent ul { | |
display: none; | |
} | |
ul li ul li.parent.active ul { | |
display: block; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#{nest("ul","li","ul","li.parent","ul")} { | |
display: none; | |
} | |
#{nest("ul","li","ul","li.parent.active","ul")} { | |
display: block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compass has a built-in selector helper for nesting things. This is sometimes useful for things like deeply nested lists, but you might have an easier time using child and/or sibling selectors.