tags:

views:

434

answers:

3

I have a couple CSS files with overlapping CSS selectors that I'd like to programmatically merge (as in not just appending one file to the end of the other). Is there any tool to do this online? or a Firefox extension perhaps?

+1  A: 

No I wish there was but the programming effort seems too much since there are multiple ways to reference a single element. The best that you can do is use a runtime like FireBug to find duplicates.

Nick Berardi
A: 

That would actually be an interesting and possibly fun thing to try and build. It also makes for an awesome job interview question!

Mark Cidade
+5  A: 

I found Factor CSS - complete with source code, but I think it does way more than I'd need. I really just want to combine CSS blocks that have the same selectors. I'll check out the source code and see if it can be converted to something usable as a TextMate bundle. That is, unless someone else manages to get to it before me.

EDIT: Even better - here's a list of web-based tools for checking/formatting/optimizing css.

M. Dave Auayan