Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Latest commit

 

History

History
31 lines (22 loc) · 887 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 887 Bytes

Dresscode

An experimental (meaning: do not use this) mixin-supported alternative to the BEM naming convention.

Gif of Jeff Goldblum in Jurrassic Park with the quote "Your scientists were so preoccupied with whether or not they could, they never stopped to think if they should"

Demo of Dresscode in use, from the example case included in the repo.


Use Case: turns typical BEM classes like this:

<!-- Typical BEM -->
<div class="header--signed-out__logo--dark-mode">

into this:

<!-- Dresscode -->
<div class="header~signed-out:logo~dark-mode">

examples:

  • <div class="parent">
  • <div class="parent:child">
  • <div class="parent~variant:child">
  • <div class="parent:child~variant">
  • <div class="parent~variant:child~variant">