`# 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)
Great tool
Thanks @ashishsimplecoder Let me know if thereβs any feature youβd love to see added βοΈ