Skip to content

Instantly share code, notes, and snippets.

@ncoden
Last active April 21, 2016 12:04
Show Gist options
  • Save ncoden/ca7be015a5bf2fa6a5e76084420d991e to your computer and use it in GitHub Desktop.
Save ncoden/ca7be015a5bf2fa6a5e76084420d991e to your computer and use it in GitHub Desktop.
// Without BEM :
@include object(myblock) {
// Inherit from an other object
@include inherit(base, trait);
...
// Set an attribute
$_attribute: attr-set(color, #fff);
@include attr-set(attribute, #fff);
// Get an attribute
property: $_private-attribute;
property: $_inherited-attribute;
property: attr-get(other-object, public-attribute);
// Set a sub-object
@include subobject(__myelement) {
...
}
@include subobject(--mymodifier) {
}
}
// Or, with BEM aliases
@include block(myblock) {
// Inherit from an other block
@include inherit(base, trait);
...
@include element(myelement) {
...
}
@include modifier(mymodifier) {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment