W3C home > Mailing lists > Public > www-style@w3.org > May 2009

Re: how to normalize redundant CSS?

From: Phlip <phlip2005@gmail.com>
Date: Sun, 17 May 2009 08:40:52 -0700
To: www-style@w3.org
Message-ID: <gupb67$m0d$1@ger.gmane.org>
Phlip wrote:

> Does anyone know a tool that reads a page's CSS, normalizes it into one 
> flat stoopid file, with all the duplication taken out?

I just...

  - saved the whole page with Firefox
  - went into the saved folder
  - cat *.css >all.css
  - csstidy all.css >simple.css
  - pasted simple.css into (hopefully) my lowest CSS file
  - refreshed the browser cache
  - refreshed the page
  - nothing twitched!

The problem with this approach is CSStidy did not reach into my HTML and merge 
all the redundant style class attributes. That means if the old system had the 
same class repeated many times with different names, the new system still uses 
that. I'm bloody aware that a CSS tool cannot reach into my raw HTML source 
(which happens to be HAML), but a feeb attempt would have been nice. Thots?

-- 
   Phlip
   http://flea.sourceforge.net/resume.html
Received on Monday, 18 May 2009 09:24:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:18 GMT