Skip to content

Instantly share code, notes, and snippets.

@jnowland
Forked from stowball/nest-all.scss
Last active December 17, 2015 04:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnowland/5552732 to your computer and use it in GitHub Desktop.
Save jnowland/5552732 to your computer and use it in GitHub Desktop.
//Simple comment up here to explain that accordion is a accordion with 3 parts blah blah blah
.accordion {
.js & {
display: none;
}
.js .open + & {
display: block;
}
//dont use & unless it changes the order here.
li {
border-top: 1px solid #e2e4e6;
&:first-child {
border-top-color: transparent;
}
}
//dont use & unless it changes the order here.
a {
@include rem(padding, 5px 10px 6px);
//& is applicable here are you are changing the default nesting behavior by putting it like ".accordion a.icon" not ".accordion a .icon"
&.icon {
padding-left: 40px;
position: relative;
}
&.icon img {
@include rem(left, 10px);
margin-top: -2px;
position: absolute;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment