CSS Declaration Organization

Fundamentals of CSS

As I am going through these exercises I was curious what the industry standard was for organizing CSS declarations. It seems that they are in alphabetical oder. Is this the common practice?

I’ve always been taught that CSS declarations should follow the flow of the page.

For example the header declarations on top and the footer declarations on the bottom. Aside from page flow I would stick with alphabetical like you stated.

1 Like

There are many different practices to organize CSS. BEM is one popular way to organize it:

2 Likes