Skip to content

Instantly share code, notes, and snippets.

@yckart
Created May 3, 2015 19:49
Show Gist options
  • Save yckart/c2ae31ed7217a9107535 to your computer and use it in GitHub Desktop.
Save yckart/c2ae31ed7217a9107535 to your computer and use it in GitHub Desktop.
BEM - BEM - BEM

Unimportant BEM methodology.

#{BEMBEMBEM('.style', color)} {
  color: red;
}
.style, .style--color, .style__color {
  color: red;
}
@function BEMBEMBEM($property, $value) {
$props: ();
$props: append($props, #{$property}, comma);
$props: append($props, #{$property}--#{$value}, comma);
$props: append($props, #{$property}__#{$value}, comma);
@return $props;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment