Last active
April 21, 2016 12:04
-
-
Save ncoden/ca7be015a5bf2fa6a5e76084420d991e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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