Skip to content

Instantly share code, notes, and snippets.

@stoplion
Created October 29, 2013 15:32
Show Gist options
  • Select an option

  • Save stoplion/7216907 to your computer and use it in GitHub Desktop.

Select an option

Save stoplion/7216907 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
// unnest for BEM--------------------------------
.sidebar
color: red
@at-root #{&}__categories
color: blue
@at-root #{&}__tags
color: green
@at-root #{&}--selected
background: black
// unnest elements from MQ --------------------------------
@media screen and (max-width: 320px)
.sidebar
width: 50%
@at-root (without: media screen)
color: red
// Mixins for BEM--------------------------------
@mixin e($name)
@at-root #{&}__#{$name}
@content
@mixin m($name)
@at-root #{&}--#{$name}
@content
.header
+e(avatar)
color: red
+m(rounded)
color: green
.sidebar {
color: red;
}
.sidebar__categories {
color: blue;
}
.sidebar__tags {
color: green;
}
.sidebar__tags--selected {
background: black;
}
@media screen and (max-width: 320px) {
.sidebar {
width: 50%;
}
}
.sidebar {
color: red;
}
.header__avatar {
color: red;
}
.header__avatar--rounded {
color: green;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment