Skip to content

Instantly share code, notes, and snippets.

@artieziff
Last active August 29, 2015 14:25
Show Gist options
  • Save artieziff/b913c30439920b1538a8 to your computer and use it in GitHub Desktop.
Save artieziff/b913c30439920b1538a8 to your computer and use it in GitHub Desktop.

###SMACSS ####Categories

  • Base are the defaults. They are almost exclusively single element selectors but it could include attribute selectors, pseudo-class selectors, child selectors or sibling selectors. Essentially, a base style says that wherever this element is on the page, it should look like this
  • Layout divide the page into sections. Layouts hold one or more modules together
  • Module are the reusable, modular parts of our design. They are the callouts, the sidebar sections, the product lists and so on.
  • State are ways to describe how our modules or layouts will look when in a particular state. Is it hidden or expanded? Is it active or inactive? They are about describing how a module or layout looks on screens that are smaller or bigger. They are also about describing how a module might look in different views like the home page or the inside page.
  • Theme are similar to state rules in that they describe how modules or layouts might look. Most sites don’t require a layer of theming but it is good to be aware of it

####Naming

/* Example Module */
.example { }
/* Callout Module */
.callout { }
/* Callout Module with State */
.callout.is-collapsed { }
/* Form field module */
.field { }
/* Inline layout */
.l-inline { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment