Last active
August 29, 2015 14:26
-
-
Save bionicbrian/6da0e080f5237610d6ed to your computer and use it in GitHub Desktop.
Module SCSS
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
.y-thingy { | |
$root: &; // Store it for later use... | |
background-color: pink; | |
border: 1px solid purple; | |
&__content { | |
margin: { | |
top: 5px; | |
bottom: 10px; | |
} | |
// The last thingy's content element has margin-bottom 0 | |
#{$root}:last-of-type & { | |
margin-bottom: 0; | |
} | |
} | |
&__menu { | |
$menu-name: &; // For later use... | |
background-color: white; | |
padding: 5px; | |
&--is-active { | |
background-color: pink; | |
} | |
&__toolbar { | |
/* ^ Now two blocks down. But name not unwieldy? */ | |
float: right; | |
background-color: #999; | |
#{$menu-name}--is-active & { | |
background-color: pink; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment