DEV Community

loading...

Discussion on: Harry Potter and the Order of CSS

Collapse
petedermott profile image
Pete Dermott

It has to be alpha for me.

There is zero a learning curve for any new developers who come into the team who may not be 100% au fait with CSS, you don't have to worry about 1 rule overwriting another, plus it's the easiest thing in the world to remember.

With groups you'll have to remember what prop goes with what group, the order the groups go in, yea you could get a tool to do it but why complicate what is already probably a pretty complicated build process to spit out some HTML?

At this point not sorting at all would probably drive me a little bit crazy...

Collapse
thekashey profile image
Anton Korzunov Author

Yep, this is a most popular alpha-pro opinion - the absence of a learning curve.
But what does alpha sort solves for you? I mean - everything should do something valuable, and what is valuable for you here - why not random sort?

Collapse
petedermott profile image
Pete Dermott

It just keeps things neater whilst not having a big learning curve and I've gotten tripped up by the duplicated properties a few times in the past.

Yes, it probably would be faster not to bother but I've done it for so long I'm just a bit OCD about it at this point.

Collapse
puiutucutu profile image
puiu

Not really sure I agree with this reasoning.

For starters, anyone coming in that is uncomfortable with CSS is going to be just as lost with alpha order or grouping. At least with the grouping by role/function, the CSS-shy dev will be forced to understand why certain rules in CSS absolutely must go together.

Collapse
petedermott profile image
Pete Dermott

Why would they be lost with alpha order? Most people know the alphabet right?