Skip to content

Instantly share code, notes, and snippets.

Created October 21, 2013 17:16
Show Gist options
  • Save anonymous/7087440 to your computer and use it in GitHub Desktop.
Save anonymous/7087440 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.7)
// ----
/*
BLOCK__ELEMENT--MODIFIER
*/
@import "compass";
@import "compass-placeholders";
@function BEM($block, $element, $modifier) {
@if $element == null {
@if $modifier == null {
@return #{$block}
}
@else {
@return #{$block}--#{$modifier}
}
}
@else {
@if $modifier == null {
@return #{$block}__#{$element}
}
@else {
@return #{$block}__#{$element}--#{$modifier}
}
}
}
$BUTTON: modules-shared-atomic-components-button;
.#{BEM(#{$BUTTON}, null, "enabled")} {
opacity: 1;
}
.#{BEM(#{$BUTTON}, "text", "enabled")} {
opacity: 0.5;
}
/*
BLOCK__ELEMENT--MODIFIER
*/
.modules-shared-atomic-components-button--enabled {
opacity: 1;
}
.modules-shared-atomic-components-button__text--enabled {
opacity: 0.5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment