Skip to content

Instantly share code, notes, and snippets.

@raulghm
Created January 26, 2015 13:22
Show Gist options
  • Save raulghm/2d052f5c643aba971a1d to your computer and use it in GitHub Desktop.
Save raulghm/2d052f5c643aba971a1d to your computer and use it in GitHub Desktop.
BEM Snippet [SuitCSS, Sublime Text]
<snippet>
<content><![CDATA[
// https://github.com/suitcss/suit/blob/master/doc/naming-conventions.md
// ComponentName
// ComponentName--modifierName
// ComponentName-descendantName
// ComponentName.is-stateOfComponent
// u-utilityName
\$module: 'ComponentName';
.#{\$module} {
&-descendantName {}
&--modifierName {
.#{\$module}-descendantName {}
}
&.is-stateOfComponent {}
.u-utilityName {}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>bem</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.scss</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment