DEV Community


Discussion on: CSS Structure

madsstoumann profile image
Mads Stoumann

I used to group my CSS in a similar way, but as more and more properties were introduced, I switched to alphabetic sorting, and have never looked back! By the way, the position example can use the new inset property, to set all 4 sides with a single value:

.element {
  inset: 0;
  position: absolute;
Enter fullscreen mode Exit fullscreen mode
eljayadobe profile image

Alphabetic sorting for the win!

But, in the few cases where alphabetic sorting can't be done because the order is important... please comment the code!

alextsalg profile image
Alex Salgado Author

@madsstoumann yess! inset is an awesome property, I saved that one to another post along with other properties that saves time and are awesome.