is an undefined css class an error - and is there a detecrtion tool
some context. I have been trying to better understand why/when calibre introduces the css class pcalibre1 during a conversion.
I am asking here as sigil is my preferred investigation tool...
So, looking through various books, for usage of pcalibre1,
I find a book in my library which has the code
<p class="pcalibre2 pcalibre1"> for 1st line of each chapter
but there is no definition of pcalibre2 that I can find. Definitely not in the css sheet according to "find". Only pcalibre1 is defined, and there are no inline class definitions either
so I try all the various epub check type tools in sigil to see if the missing definition gets flagged as an error - but it doesn't- and the book renders normally.
I also tried the check/repair tools in the calibre editor and they do not report a missing definition either
so are undefined css classes generally safe to leave in?
[ just in case the definition is there, and I am just going blind, I then deliberately sabotaged the code by changing pcalibre2 to pcalibre3 - which for sure is not defined, and re ran all the checks. Every one passed OK ]
I am assuming for now that I must have accidentally deleted the definition somehow, because the alternative - that calibre adds undefined classes - seems very unlikely
this is the opposite of having an unused css class. its having an undefined css class
is there any tool which will flag up such cases that I can use- either in sigil, or outside of ?
will having undefined class(es) crash or confuse some renderers?
|