Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any utilites that will help me refactor CSS [closed]

Tags:

I am working with some CSS that is poorly written to say the least. I am not a design/CSS expert, but I at least understand the C in CSS. While the builtin CSS support inside of VS-2008 is far improved over previous versions, it still doesn't quite do what I am looking for.

I was wondering if anyone know of a good program or utility that will help me to refactor and clean up my CSS like what ReSharper allows to do with C#.

Some features that would be nice to have:

  • Examine CSS files and determine ways to extract common styles like font-style, color, etc...
  • Plugin to VS-2008 would be awesome!
  • Examine markup files and make some suggestions on improving the current use of classes and styles.
like image 438
Josh Avatar asked Sep 22 '08 11:09

Josh


2 Answers

The Dust-Me Selectors Firefox extension can scan a website and tell you what CSS is used and what is not. Removing unused CSS is one good first step in refactoring.

I have often found that when some section is removed from a website, the HTML is removed but the CSS is not.

like image 181
Liam Avatar answered Sep 25 '22 14:09

Liam


TopStyle is popular and always the one I hear recommended. It has recommendations on styles etc.

I use Aptana but this doesn't do an refactoring just flags up errors and allows you to target certain browsers. Using this a a decent CSS book may help.

like image 31
Paul Shannon Avatar answered Sep 21 '22 14:09

Paul Shannon