/>
X
Business

Alphabetical CSS!

I'm back at The Agency, undergoing covert operations on a top secret redesign. Jonny, a new recruit to the team, came up with a brilliant working practise: Alphabetical CSS.
Written by Jake Rayson Rayson, Contributor on

I'm back at The Agency, undergoing covert operations on a top secret redesign. Jonny, a new recruit to the team, came up with a brilliant working practise: Alphabetical CSS.

“Er, what?” I asked. It was late in the day, and my brain was more frazzled than a bacon snack.

“Simply put all your CSS properties into alphabetical order!” Jonny retorted, quick as adobe flash.

Well, blow me down, it works! See here for some syntax coloured examples:

Before:

Alphabetical CSS before

After:

Alphabetical CSS after

Brilliant! It makes the CSS more legible, easier to navigate and ticks all the anally retentive boxes. Thanks Jonny!

But it gets betterer. The Client (a large corporation in the field of entertainment) apparently wants the CSS written multiple line style (ie each property on a separate line). Me, personally, I like to write CSS single line stylee. It doesn’t matter, what the client wants etc.…

… An online CSS formatter!! (Sure, if you have a mind like a rubiks cube, you can do regular expressions to kick the formatting into shape. For a technophobe like myself, this is the proverbial manna in my manor.)

Editorial standards

Related

How much RAM does your Windows 11 PC need?
adobestock-339222220

How much RAM does your Windows 11 PC need?

What is ChatGPT and why does it matter? Here's what you need to know
chat bot

What is ChatGPT and why does it matter? Here's what you need to know

These are my 5 must-have devices for work travel now
ipad-mini-firewalla-purple-macbook-air

These are my 5 must-have devices for work travel now