Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-26-2020, 01:06 PM   #1
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
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?
stumped is offline   Reply With Quote
Old 03-26-2020, 01:12 PM   #2
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,497
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Classes do not need to have associated CSS properties. They can be informational or used for other purposes.
jhowell is offline   Reply With Quote
Advert
Old 03-26-2020, 01:17 PM   #3
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Quote:
Originally Posted by jhowell View Post
Classes do not need to have associated CSS properties. They can be informational or used for other purposes.
ok thanks , you are saying that code like <p class="randomgarbage"> is 100% valid and simply ignored by all readers/renderers , and that's why the checking tools do not flag it.

no need to reply if YES, but if I continue to misunderstand then please clarify
stumped is offline   Reply With Quote
Old 03-26-2020, 01:35 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes, and Sigil also uses them that way when marking words for inclusion in an index, marking potential headers, etc.

In fact, for spellchecking some html software adds a "spellerror" class (with an onhover menu) although it has a css definition to do a red squiggly underline) and added spans to mark potentially misspelled words and then uses javascript to remove that class when a user marks the word as ignore or correct. That way spellchecking can be external to the browser engine because some browser spellcheck dictionaries can leave a lot to be desired.

So the "misuse" of class names is one way to "mark" things in the DOM for a variety of reasons.
KevinH is online now   Reply With Quote
Old 03-26-2020, 02:23 PM   #5
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
It gets even more hairy when you include other attributes besides class. See for example a book from Standard Ebooks where they use the epub attributes. They do declare them in the namespaces (the '<html xmlns=' at the beginning of the file) but they make me nervous since my Kobo's renderer can be fragile.
hobnail is offline   Reply With Quote
Advert
Old 03-27-2020, 08:29 PM   #6
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 183
Karma: 266070
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
However, I think that Sigil should show classes not in any css in the Reports: it would help to check for leftovers after a thorough (manual) re-format.
carmenchu is offline   Reply With Quote
Old 03-27-2020, 08:37 PM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
We will consider it but it would be very low priority as they are perfectly legal and have many uses.
KevinH is online now   Reply With Quote
Old 03-27-2020, 09:25 PM   #8
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 183
Karma: 266070
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
And so are most things in Reports. I look at Reports, for instance, to see if there are characters or external links that 'don't belong', however correct they might be.
carmenchu is offline   Reply With Quote
Old 03-28-2020, 02:04 AM   #9
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Quote:
Originally Posted by KevinH View Post
We will consider it but it would be very low priority as they are perfectly legal and have many uses.
i'd appreciate the ability to check. low priority is fine, so is a simple report + having to manually remove them still
stumped is offline   Reply With Quote
Old 03-28-2020, 09:04 AM   #10
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Perhaps a plugin approach might be easiest if this is something you feel is important.
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB-Checker error: undefined property Dabcar ePub 15 02-16-2020 12:49 AM
Debian 9.8 VM: Calibre install, import error: undefined symbol: crypt_r Sinac Calibre 3 03-26-2019 07:42 AM
KindleGen error message: E1003 Unknown error in class String. Doitsu Kindle Formats 1 06-25-2014 12:29 PM
ADE breaks CSS --> CSS Validation: Parse Error / Value Error dasboeh ePub 4 12-10-2012 03:25 AM
PRS-600 Sony library - Error undefined omk3 Sony Reader 13 01-22-2010 10:52 AM


All times are GMT -4. The time now is 03:20 PM.


MobileRead.com is a privately owned, operated and funded community.