Created
April 10, 2014 17:35
-
-
Save jbutko/10405095 to your computer and use it in GitHub Desktop.
SASS, SCSS, CSS: Select all elements on the same node level
This file contains hidden or 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
.second { | |
.first ~ & { | |
/* styles to be applied to .second if a .first exists at the same node level */ | |
} | |
} | |
// From http://stackoverflow.com/questions/15246387/css-and-or-sass-sibling-selector-upwards |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment