Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-12-2025, 09:09 PM   #1
ChrisI
Connoisseur
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 58
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
CSS Validation

When an epub has multiple style sheets and I run CSS Validation, the number of open tabs matches the number of style sheets, but the first tab is blank.

However, if the browser is open before I run the validation, all the style sheets are validated.

Not a big deal, as most books only have one style sheet, and it is easy enough to leave the browser open and hit the button again.

I am running on Windows 11 with Firefox, if it matters.
ChrisI is offline   Reply With Quote
Old Yesterday, 09:58 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,370
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Have you tried the CSS Validator plugin? It is much faster and doesn’t require internet access/browser to work.
Turtle91 is offline   Reply With Quote
Old Yesterday, 12:56 PM   #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: 8,948
Karma: 6361444
Join Date: Nov 2009
Device: many
I can not recreate this on MacOS with the Safari browser. Have you tried to recreate your issue with Edge or Chromium browsers. All Sigil is doing with these cases is submiting code to a web server through your system browser windows, not Sigil windows.
KevinH is offline   Reply With Quote
Old Yesterday, 01:54 PM   #4
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: 28,753
Karma: 206739468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
A quick test on Windows 11 seems to confirm the OP's issue/behavior. It opens Edge even though Firefox is configured as the default browser. But Qt's Desktop Services have never been very precise about opening the default browser on Windows.

Last edited by DiapDealer; Yesterday at 02:07 PM.
DiapDealer is offline   Reply With Quote
Old Yesterday, 02:08 PM   #5
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: 8,948
Karma: 6361444
Join Date: Nov 2009
Device: many
I will try to recreate it on Linux.
KevinH is offline   Reply With Quote
Old Yesterday, 02:35 PM   #6
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: 8,948
Karma: 6361444
Join Date: Nov 2009
Device: many
I can not recreate this on Linux either.

Here is exactly what I am trying:

1. Make sure my default browser is not open or running.

2. open our latest Sigil User Guide in Sigil (which has 2 stylesheets)

3. in BookBrowser I highlight both css files and then right click and select "Validate with W3C"

4. I wait and a browser window with two tabs open and both say pass.

This works on Manjaro Linux with FireFox or Chrome as the default browser, and it works on MacOS with Safari as the default browser.

So whatever is going on must be Windows specific and interfering with both stylesheets being validated.
KevinH is offline   Reply With Quote
Old Yesterday, 03:17 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: 28,753
Karma: 206739468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm using Tools->Validate rather than using the Validate from the context menu in Book Browser. It seems to work as for me as well when doing it that way, too. It's only attempting to validate the highlighted files that way. But when doing it from the Tools menu (which attempts to validate all .css files in the epub), it's hit or miss with me. Sometimes the first tab is empty, sometimes not. I'm always starting with my browser completely closed.
DiapDealer is offline   Reply With Quote
Old Yesterday, 03:24 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: 8,948
Karma: 6361444
Join Date: Nov 2009
Device: many
I will try that approach.

But the code that does each are almost identical:

From BookBrowser:
Code:
void BookBrowser::ValidateStylesheetWithW3C()
{
    QList <Resource *> resources = ValidSelectedResources(Resource::CSSResourceType);
    foreach(Resource * resource, resources) {
        CSSResource *css_resource = qobject_cast<CSSResource *>(resource);
        Q_ASSERT(css_resource);
        css_resource->ValidateStylesheetWithW3C();
    }
}
And from MainWindow
Code:
bool MainWindow::ValidateStylesheetsWithW3C()
{
    SaveTabData();
    QList<Resource *> css_resources = m_BookBrowser->AllCSSResources();

    if (css_resources.isEmpty()) {
        ShowMessageOnStatusBar(tr("This EPUB does not contain any CSS stylesheets to validate."));
        return true;
    }

    foreach(Resource * resource, css_resources) {
        CSSResource *css_resource = qobject_cast<CSSResource *>(resource);
        css_resource->ValidateStylesheetWithW3C();
    }
    return true;
}
So I realy can not see why one would work and the other one not.

I tried this on MacOS and it worked properly all the time, both ways.

When I get a chance I will try it on Linux and report back.

Last edited by KevinH; Yesterday at 03:39 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 03:36 PM   #9
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: 28,753
Karma: 206739468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I am using Firefox on that Windows machine I tested on, so that could be the connection. I'm not used to the latest look of Firefox on Windows and mistook it for Edge. I wasn't seeing the Firefox logo anywhere.
DiapDealer is offline   Reply With Quote
Old Yesterday, 04:06 PM   #10
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 280
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
I've made several tries on my W11 box with Firefox (default) closed. Each time, using either method, Windows opened Firefox with two tabs confirming no problems found.

Curiously, there was no way to tell which tab referred to which CSS Styles sheet. But as they were both NFF, it didn't matter.

When I tried using the latest version I have of the Sigil User Guide 2.3.0+, Windows correctly opened two tabs in Firefox. W3C reported NFF in one tab and 1 fault in the other tab. The W3C tabs didn't have any filename attached to their reports but the fault was listed as on URI 8 and detailed so I could locate it by inspection.

Shame they don't report the CSS style sheet filename.
philja is offline   Reply With Quote
Old Yesterday, 04:10 PM   #11
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: 8,948
Karma: 6361444
Join Date: Nov 2009
Device: many
If you want more info please use the CSSValidator plugin. It will fill all the information into the validator window. I actually never use the W3C validator any more since the CSSValidator plugin became available but it still exists as it was the only css validator for years.

Last edited by KevinH; Yesterday at 04:19 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 04:11 PM   #12
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 280
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by DiapDealer View Post
I am using Firefox on that Windows machine I tested on, so that could be the connection. I'm not used to the latest look of Firefox on Windows and mistook it for Edge. I wasn't seeing the Firefox logo anywhere.
I just upgraded my W10 to W11 a couple of weeks or so ago, and I hadn't noticed that the Firefox logo is missing now. But you're quite right.
philja is offline   Reply With Quote
Old Yesterday, 06:02 PM   #13
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,367
Karma: 171313058
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For what it may be worth, I tried to use the Tools => Validate stylesheets with W3C under Windows 11 using Firefox as the default browser.

What I get is the opening W3C page showing the no Javascript check button and then a I/O error message page.

This also happens with Microsoft Edge but Google Chrome does work.

Since I use the CSSValidator plugin, I can't say how long this behaviour has been going on.
Attached Thumbnails
Click image for larger version

Name:	sigil_validate_01.png
Views:	7
Size:	34.7 KB
ID:	218069   Click image for larger version

Name:	Screenshot 2025-09-13 145711.png
Views:	8
Size:	29.6 KB
ID:	218070  
DNSB is offline   Reply With Quote
Old Yesterday, 06:13 PM   #14
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: 28,753
Karma: 206739468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DNSB View Post
What I get is the opening W3C page showing the no Javascript check button and then a I/O error message page.
Actually that's what I'm getting too. The only epub I had access to on that machine had some tricky imports going on in the main css files, so I chalked it up to something going on there. But now...

I never use this feature either, so no idea when it broke (or what broke)
DiapDealer is offline   Reply With Quote
Old Yesterday, 06:17 PM   #15
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,367
Karma: 171313058
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by DiapDealer View Post
Actually that's what I'm getting too. The only epub I had access to on that machine had some tricky imports going on in the main css files, so I chalked it up to something going on there. But now...

I never use this feature either, so no idea when it broke (or what broke)
I tend to the belief that it is not an issue changes in Sigil's code but rather with changes in browser security since it still works on Chrome.

For a quick test, I generated an ePub with 3 stylesheets with 2 entries in each. Got 3 tabs in Firefox and Edge with I/O errors while Chrome was still a happy camper.
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS validation uses wrong validator? bookman156 Sigil 18 03-26-2016 04:22 PM
CSS validation error kamanza Sigil 3 12-17-2012 04:40 PM
CSS validation error kamanza Conversion 11 12-12-2012 02:21 AM
ADE breaks CSS --> CSS Validation: Parse Error / Value Error dasboeh ePub 4 12-10-2012 03:25 AM
Question about validation and items referenced in css ldolse Sigil 9 02-02-2011 04:17 AM


All times are GMT -4. The time now is 12:20 AM.


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