Skip to content

Instantly share code, notes, and snippets.

@kostyrko
Forked from stephenway/README.md
Created June 15, 2020 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kostyrko/54aa8c4fd5ab64e2ea81b5d69f8183e3 to your computer and use it in GitHub Desktop.
Save kostyrko/54aa8c4fd5ab64e2ea81b5d69f8183e3 to your computer and use it in GitHub Desktop.
BEMIT Cheatsheet

BEMIT Cheatsheet

Give developers more knowledge about how the classes behave in a non-relative sense: BEM + ITCSS = BEMIT

Evolution

BEM:

.block__element--modifier {}

BEM w/ Namespaces:

.namespace-block__element--modifier {}

BEM w/ Namespaces & Responsive Suffixes:

.namespace-block__element--modifier\@suffix {}

Namespaces

Object

.o-object-name[<element>|<modifier>] {}

Component

.c-component-name[<element>|<modifier>] {}

Utility

.u-utility-name {}

Theme

.t-theme-name {}

Scope

.s-scope-name {}

State

.[is|has]-state {}

Hack

._<namespace>hack-name {}

Javascript

.js-component-name {}

Quality Assurance

.qa-node-name {}

Responsive Suffixes

Breakpoints

.o-object-name\@sm {}
.o-object-name\@md {}
.o-object-name\@lg {}

Media type

.u-utility-name\@print {}
/* Block Element */
@mixin e element-name { }

/* Block Modifier */
@mixin m modifier-name { }

/* Object */
@mixin o object-name { }

/* Component */
@mixin c component-name { }

/* Utility */
@mixin u utility-name { }

/* Theme */
@mixin t theme-name { }

/* Scope */
@mixin s scope-name { }

/* States */
@mixin is state-name { }
@mixin has state-name { }

/* Hack */
@mixin hack hack-name { }

/* Javascript */
@mixin js node-name { }

/* Quality Assurance */
@mixin qa node-name { }

/* Small Styles */
@mixin sm { }

/* Medium Styles */
@mixin md { }

/* Large Styles */
@mixiin lg { }

/* Print Styles */
@mixin print { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment