Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-21-2021, 09:07 AM   #1
Binchen
Member
Binchen began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Abakus
Tools -> Reports => Found in empty

Hi,

please have a look with the ebook i attached. When i execute Tools/reports the p.author selector is not found in the report. Its nested inside a div.titlepage. And thats symptomatic, non of the selectors inside other selectors are shown in the report "used classes".

A bug?

Binchen
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2021-07-21 at 14.40.12.png
Views:	22
Size:	115.4 KB
ID:	188270  
Attached Files
File Type: epub toolsreport.epub (2.2 KB, 7 views)
Binchen is offline   Reply With Quote
Old 07-21-2021, 09:19 AM   #2
Binchen
Member
Binchen began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Abakus
Sorry MacOS, latest Version, Sigil latest version
Binchen is offline   Reply With Quote
Advert
Old 07-21-2021, 09:59 AM   #3
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: 5,521
Karma: 3513158
Join Date: Nov 2009
Device: many
The Classes in HTML report is different. It looks ONLY for class entries (non-combinator) used in that xhtml file that exists in your css file with its own entry.

Since p.author itself does not exist as a separate entry in your Style0001.css it is not shown as existing in your css file since it technically does not exist on its own. In other words there is no selector p.author defined in your css file.

The only selector that encompasses p.author is in fact a descendent selector (a combinator) which is not a class selector (although it uses classes).

The CSS Selectors Report does in fact show that descendent selector is used and where.
And Delete Unused Selectors also properly detects its use.

Last edited by KevinH; 07-21-2021 at 10:01 AM.
KevinH is offline   Reply With Quote
Old 07-21-2021, 11:09 AM   #4
Binchen
Member
Binchen began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Abakus
Then i don't understand the "Used classes" Report.

When i add

Code:
<p class="logi">Logo</p>
to my ebook, i thought i can find misspelled classes. Now i see in the "Classes used" p.author and p.logi but both with an empty "Found in" column. I expected that p.author is flagged as used in Style0001 even if its inside a div. Now i can not distinguish between p.author and p.logi. One is correct, the other its obvious that it should be p.logo.

When i now look at CSS selectors, p.logi is not listed (as ecpected).

How can i find out that p.logi is not being declared anywhere in the CSS file? Classes used is showing this but with hundreds classes being defined, epubcheck ist not showing this and flightcrew neither.

Currently i cant see a usecase for "Classes used". And p.author is used and in Style0001.

Binchen
Binchen is offline   Reply With Quote
Old 07-21-2021, 11:26 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 63,614
Karma: 103394323
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
I see no reason to use CSS such as p.author instead of .author. This is yet another reason not to use p.author instead of .author.
JSWolf is offline   Reply With Quote
Advert
Old 07-21-2021, 11:40 AM   #6
Binchen
Member
Binchen began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Abakus
I see a reason to do so and its nothing weired, is valid and is understood by 99% of the readers.

A signature in a letter might be different to a signature.

Can we please refrain from such discussions of principle? I'm not going to change my standard CSS stylesheets because your way of coding it is different.
Binchen is offline   Reply With Quote
Old 07-21-2021, 12:21 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 24,252
Karma: 163636384
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
I see no reason to use CSS such as p.author instead of .author. This is yet another reason not to use p.author instead of .author.
Moderator Notice
This is not at all relevant to the perceived Sigil issue being reported. Please refrain from off-topic, personal-preference posts in bug-report threads.
DiapDealer is offline   Reply With Quote
Old 07-21-2021, 01:48 PM   #8
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: 5,521
Karma: 3513158
Join Date: Nov 2009
Device: many
Combinator selectors are not class selectors. The use case is that it tells you if that class selector is used but not listed as found in a stylesheet, then you know it is only part of a descendant class or other combinator or a misspelled classes or otherwise non-defined class.

In other words if your p.author class was in a div of a different type or nested in some other way, it would not be used at all since the p.author class is not in and of itself defined.

If you use a class selector and define it, it will be found.

So yes, looking at that report will show you which class selectors are defined and where. The CSS Selectors report where tell you if a defined selector (of any type) is used.

Using these reports can help you track down issues with classes.

You can export these reports to csv and merge them as needed.

Last edited by KevinH; 07-21-2021 at 01:59 PM.
KevinH is offline   Reply With Quote
Old 07-22-2021, 05:43 AM   #9
Binchen
Member
Binchen began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Abakus
Thanks for the information so far. I personnally can still not see any value in this report but maybe others do.

But back to my original problem. I thought that this could be a way to find mistyped class attributes. When i add

Code:
<p class="logi">Logo</p>
its syntactically correct. Its not mandatory to have something corresponding in the CSS, so neither Flightcrew nor epubcheck are complaining.

But semantically its obvious that there should be something present, either in styles in the head section or in any linked stylesheet file.

Is there something in Sigil which can help me to find class attributes that have no equivalent in any stylesheet?

Binchen
Binchen is offline   Reply With Quote
Old 07-22-2021, 09:57 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: 5,521
Karma: 3513158
Join Date: Nov 2009
Device: many
Try the wrCisco's cssUndefinedClasses plugin for Sigil.

Or as I explained earlier, merge the html classes report with the css selectors used report. You can even do that manually by just checking what few classes are not found in the html classes report (sort on that column) with the css selectors report of found combinator selectors.

But even that will not tell you if a class was added to help identify an element for some other reason such as javascript code, etc.

Alternatively you can use Search to find any not found class selectors used in the xhtml file and use Preview's Inspector to see the fully inherited CSS of that element.

Last edited by KevinH; 07-22-2021 at 10:35 AM.
KevinH is offline   Reply With Quote
Old 07-22-2021, 09:57 AM   #11
BeckyEbook
Evangelist
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 406
Karma: 1093035
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
Quote:
Is there something in Sigil which can help me to find class attributes that have no equivalent in any stylesheet?
Plugin cssUndefinedClasses.

Important Note:
Do not use for delete, only to search for undefined classes.
BeckyEbook is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Data sees new empty folders as not empty mivetters Library Management 6 12-21-2019 03:18 PM
squashed images in Editor/Tools/Reports after search rjwse@aol.com Calibre 1 12-18-2019 12:00 PM
lots of empty folders, "no suitable source format found" -- clueless etitameh Calibre 11 08-08-2010 09:30 PM
Cybook not found in linux, found in win XP fjf Bookeen 15 01-18-2008 06:57 PM
Found super fast tools to divide A4 to 2 A5 pages jimmyzou Sony Reader 3 04-23-2007 02:48 PM


All times are GMT -4. The time now is 07:14 AM.


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