Pull to refresh
22.32

CSS *

Cascading Style Sheets

Show first
Rating limit
Level of difficulty

Happy Potter and the Order of CSS

Reading time5 min
Views4.1K


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
Comments0