View Single Post
Old 06-29-2020, 10:22 AM   #54
mcdummy
Connoisseur
mcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the rough
 
mcdummy's Avatar
 
Posts: 73
Karma: 7130
Join Date: Apr 2015
Device: PRS-T3
Quote:
Originally Posted by wrCisco View Post
I'd rather think about providing a different plugin that could automatically remove unmatched classes in xml/xhtml than modifying this one. That's because this plugin is designed to run as safely as possible on as many epubs out there as possible, and in doing so it changes absolutely nothing outside of css files. Adding this feature would open a whole new set of issues and edge cases to be worried about.
I'm happy with a separate plugin, if it both indicates the unmatched classes and provides an option to select those that should be deleted. Automatic deletion is a bit disadvantageous, since I often want to keep some of the classes and add the definitions to the css.

Quote:
Originally Posted by wrCisco View Post
Just showing the classes unmatched by a selector is already done by the Reports tool as DNSB pointed out.
Combining the report and deletion in one tool makes things easier.

Quote:
Originally Posted by wrCisco View Post
About merging rulesets, I think that's not impossible, but that's not totally safe either:
Code:
.classA {}
.classB { color: red }
.classA { color: blue }
is not the same as
Code:
.classA { color: blue }
.classB { color: red }
for a tag like <p class="classA classB">.
Was not aware of this problem. It would be good to be informed about double defintions either of classes or within a class. An option to merge or delete double definitions would be great.
mcdummy is offline   Reply With Quote