![]() |
#1 |
Connoisseur
![]() Posts: 69
Karma: 10
Join Date: Jul 2023
Device: none
|
Delete Unused Stylesheet Selectors selects all my styles.
Title says it all.
|
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 824
Karma: 2536588
Join Date: Jan 2017
Location: Poland
Device: Various
|
Your href is incorrect. Letters are case-sensitive.
Change: styles -> Styles Code:
href="../Styles/Style0001.css" |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,603
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Your incorrect/broken links are why no stylesheet selectors are in fact used so Sigil is correct here.
You can use Sigil itself to create the links to your stylesheets from your xhtml files to help prevent typing errors like yours. |
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() Posts: 69
Karma: 10
Join Date: Jul 2023
Device: none
|
Thank you. What confuses me is that the styles are applied and the report 'Classes Used in HTML Files' shows the proper styles.
|
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,603
Karma: 5703586
Join Date: Nov 2009
Device: many
|
You are on a Windows box or on a MacOS box with a case-insensitive file system right? Windows and Macs do try to preserve case (remember the way you really typed it) but is still case insensitive underneath. (so styles maps to Styles and visa-versa).
On a OS that has a case sensitive file system, this is not true (MacOS if the user enables it, Linux all the time, etc). The key is that by definition, hrefs are case sensitive and "styles in not equal to "Styles" which is true for all url path elements across the web. I have never liked case insenstive file systems but Windows still seems to be stuck in the past for this. So on my MacOS machine, the first thing I do is reformat the disk to be case-sensitive so that errors like these can be easily caught. If your epub is ever published and read on a device that is Linux based underneath (read that most of them) then it would be broken. It just happens to work on Windows/some Macs but in reality that is because the file system maps from one to other. The web url spec is clear on how it should be handled by software and browsers. My guess is that epubcheck would have detected this error. That is a plugin well worth using. Last edited by KevinH; 05-29-2025 at 01:35 PM. |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Delete unused stylesheet classes" problems with overloaded styles | AlanHK | Sigil | 82 | 01-24-2021 11:10 AM |
alphabetizing stylesheet, check book, and remove unused styles | rjwse@aol.com | Calibre | 9 | 01-29-2020 06:48 PM |
Move incode-styles to css-stylesheet with a tool? | patrik | Workshop | 3 | 03-18-2017 02:14 PM |
Cleaning a stylesheet of unused styles | roger64 | Sigil | 49 | 06-13-2012 05:23 AM |