Skip to content

Instantly share code, notes, and snippets.

@csswizardry
Created July 9, 2015 09:36
Show Gist options
  • Select an option

  • Save csswizardry/48fbe609aee606046292 to your computer and use it in GitHub Desktop.

Select an option

Save csswizardry/48fbe609aee606046292 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
/**
* You can certainly write your BEM classes like this. It’s much
* more terse and you can change `widget` to `box` in just one
* place. The only downside is that the string `widget__title`
* now doesn’t acatually exist anywhere in your codebase: you’ve
* broken it in two meaning you would struggle to do a grep or
* find for it. That’s the only real drawback.
*/
.widget {
display: block;
padding: 10px;
&--large {
padding: 20px;
}
&__title {
font-size: 100%;
font-weight: bold;
}
}
@charset "UTF-8";
/**
* You can certainly write your BEM classes like this. It’s much
* more terse and you can change `widget` to `box` in just one
* place. The only downside is that the string `widget__title`
* now doesn’t acatually exist anywhere in your codebase: you’ve
* broken it in two meaning you would struggle to do a grep or
* find for it. That’s the only real drawback.
*/
.widget {
display: block;
padding: 10px;
}
.widget--large {
padding: 20px;
}
.widget__title {
font-size: 100%;
font-weight: bold;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment