Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CSS Best Practices

No css on tags (h2, h4, etc) almost all CSS methologies recommend flat structures in the vein of:

The ampersand in Sass can be used to essentially do namespacing rather than compound selectors.

This.

.what { color: red; &-so { color: green; &-ever { color: blue; } } }

Results in:

.what { color: red; } .what-so { color: green; } .what-so-ever { color: blue; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.