View Single Post
Old 06-01-2012, 05:08 PM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 1,498
Karma: 846401
Join Date: Jan 2009
Device: KoboGlo
Cleaning a stylesheet of unused styles

Hi

I am not sure this belong to the Sigil forum. Please forgive me if I am mistaken.

Ideally we all have clean style sheets. Nearly always. Sometimes, though, from a badly formatted file, after using a too trusting and not enough discriminating converter, some (many) unused styles land in the style sheet and clutter it.

As a prevention tool, just before publishing, I'd like to be sure that my style sheet contains only styles that are really used in the html files and to be able to discard the others.

I can imagine for example a script or a tool, parsing the style sheet, then counting and summing up the occurrences of styles in the html files. After that, a style showing 0 occurrence could probably be safely deleted.

Maybe there could be other solutions?
roger64 is offline   Reply With Quote