Quote:
Originally Posted by cybmole
the "logic" for detecting functionally identical classes would be ridiculously complicated, because there are so many ways to say the same thing in shorthand. e,g, margin can be specified in up to 4 separate lines, : margin-top, margin-bottom... or in a single margin line with 4 parameters.
the best you could probably hope for is detecting identical blocks of definitions; even coping with the individual css lines being in a different order within different definitions would be challenging
|
Yes, first priority is to gather all css definitions in one place (a css file). That wouldn't necessarily require advanced css parsing. Merging css classes is more complicated and will probably require a parser. Unfortunately it doesn't seem that Qt provides an API for the webkit css parser, that would've been great
Quote:
Originally Posted by cybmole
there are "master sets" of "in-house" CSS out there, with an definition for everything you could possibly need - inspect any book that uses the adobe approach - but I much prefer to see only what is actually needed for the given book, within the style sheet, not a load of excess stuff.
|
If extraneous classes bother you: Sigil already has a "Delete unused stylesheet classes" function, have you tried it?