Quote:
Originally Posted by meme
I don't know CSS that well, yet, but from what I've seen, the selectors you can use in CSS are very flexible, making it hard to parse. Unless EPUB only uses a subset - something I still need to find out. There are parsers out there, and it may be that one of them might help.
You would have to go through every element and then compare it against every selector to see if there is a match. For finding used but undefined entries you could simplify things by restricting what's checked (ie checking only class attributes and seeing if they match a selector. Checking just for the name doesn't cover everything as a class could only be defined for certain tags...). I created an issue to track this - just reporting on classes used in the HTML.
|
Yup, that's the problem. There's no limit, literally, to the number of classes you can have for an element. I mean, it's the equivalent of not knowing what you don't know.
It's not the elements...it's the limitless number of classes that a designer can create, particularly if they're on the fly, or, worse (for us, anyway), we get an INDD file. Man...hard for me to say enough about that.
Hitch