A detailed example of how I organise properties when writing SASS.
At work we are constantly looking for ways to improve maintainability and consistency throughout our code, which will only become more important as our team grows in the future. So, having an agreed method for grouping and formatting styles now should be a big help further down the line.
After reading the results of this CSS-Tricks poll, which asked people how they order CSS properties, I had a go at writing down my own formatting style. To be totally honest, until recently I fell into the random camp when it came to ordering properties. I would mostly just write them out in the order I thought of them and any additional rules would be added at the bottom.
I’m now trying to incorporate the grouped by type method, which came out on top in the poll, with my existing practices for formatting in SASS. This is what I have so far:
I’m maintaining the above example as a Gist so it can be modified and added to as needed.