DEV Community

FireXCore
FireXCore

Posted on

I Built a One-Click VS Code Extension That Cleans Up Ugly CSS (Open Source)

`# I Built a One-Click VS Code Extension That Cleans Up Ugly CSS (Open Source)

Hey Devs πŸ‘‹

You know that moment when you open a legacy .css file and it hits you with:

  • πŸ’€ 3000+ lines of messy code
  • πŸ‘» duplicate properties
  • 😩 inconsistent indentation
  • 🀑 properties in random order
  • and a lot of !important everywhere?

Yeah. Same here.

So I built Smart AutoCSS β€” a VS Code extension that fixes all of it with just one click.


⚑ What it does (in one click):

βœ… Auto-cleans indentation

βœ… Removes duplicate properties

βœ… Sorts CSS properties logically

βœ… Works on .css and .scss

βœ… No setup required β€” just right-click β†’ "Smart AutoCSS"


πŸ“· Before vs After

`css
/* Before */
.btn {color:#fff; background-color:#000;padding:10px;margin:0px;color:#fff;}

/* After */
.btn {
background-color: #000;
color: #fff;
margin: 0px;
padding: 10px;
}
`

Top comments (2)

Collapse
 
ashishsimplecoder profile image
Ashish Prajapati

Great tool

Collapse
 
firexcore profile image
FireXCore

Thanks @ashishsimplecoder Let me know if there’s any feature you’d love to see added ✌️