Alex Rivera | Logout

Are there any utilites that will help me refactor CSS

Asked 2008-09-22T11:07:05.677
23

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.
Edit
Report

2 Answers

3

If you're using ASP.NET 2.0, there's ReFactor! for ASP.NET

answered 2008-09-22T11:17:02.813
1

I might be a little late but the ReSharper 6 early access preview (EAP) does this for you!

In a CSS file, entering "#" will auto-complete every ID from your project. Same with a period "." to list all your classes.

Best part: when you rename the selector it will rename it project-wide. It makes refactoring CSS much faster, if not pleasurable.

answered 2011-05-05T17:57:43.997

Your Answer