11 ms·
I'm very much the same, but I lump it into: Hacks, Layout, Decoration, Animation, Misc. I order every property in each bucket by their importance. - Hacks: re
by spartanatreyu 4y ago
I'm very much the same, but I lump it into: Hacks, Layout, Decoration, Animation, Misc.
I order every property in each bucket by their importance.
- Hacks: reserved for very special cases that solve an issue. I keep this at the top so it's the first thing I see for a class (e.g. box-sizing, -webkit-touch-callout, pointer-events, outline for debugging, etc...)
- Layout this usually means display, position, box-model.
- Decoration: this usually means border, background, text
- Animation: this usually means transitions, non-layout transforms and animations
- Misc: Anything out of the ordinary. Related media queries (soon to be replaced by container queries), scss nested elements, etc...