Created
October 30, 2013 17:25
-
-
Save jewlofthelotus/7236618 to your computer and use it in GitHub Desktop.
A WIP guide on how to setup styles for a new block in an OOCSS / BEM / SMACSSish modular architecture.
This file contains 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
/* ========================================================================== | |
Block Title | |
========================================================================== */ | |
/** | |
* Markdown Example (HAML) | |
* | |
* %div.block_modifiers | |
* %header.block--element_modifiers | |
* %a{:href => "#"} Some Link | |
*/ | |
// If the block or any of it's elements can have modifiers, they | |
// should be initialized with a class attribute selector here. | |
[class*="block"] {} | |
[class*="block--element"] {} | |
// Non-modifiable elements, if any, should come next. | |
.block--element2 {} | |
.block--element3 {} | |
/* -------------------------------------------------------------------------- | |
Block Modifiers | |
-------------------------------------------------------------------------- */ | |
// Next define your modifiers using the exact class selector. | |
.block__modifer {} | |
.block__modifer2 {} | |
.block--element__modifer {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment