Quote:
Originally Posted by roger64
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?
|
IMHO this is a EPUB forum question, but I will not move the thread unless requested because of possible overlap with Flightcrew checks.
Feature has been requested as part of the Calibre Quality Check PI.
Flightcrew only concerns itself with invalid EPUB syntax. Excess (unused) selectors is not against
the rules. (In reality, Flightcrew does not complain if a selector does not exist and this should be at minimum, a Warning event
. )