Pull to refresh


Cascading Style Sheets

Show first
Rating limit

Happy Potter and the Order of CSS


So, first of all — this is not a common battle. It's not about CSS versus CSS-in-JS, not atomic CSS versus BEM, not LESS vs SASS. This battle is about THE ORDER.

This battle is between ORDER and CHAOS. And between ORDER and,… another ORDER. In short — about a better way to sort CSS properties. No more, no less.

In short — there are 3 ways to do it:

  • don't do it. Write any CSS as you can. This is the most popular way
  • group properties by sense. Just put some stuff together. This is a quite popular way.
  • order all the properties alphabetically. The easiest, but less popular way.
Read more →
Total votes 10: ↑9 and ↓1 +8
Views 3.2K
Comments 0

Authors' contribution