Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 02:08 AM   #1
byword
Enthusiast
byword began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Apr 2022
Device: Onyx Leaf 3
Issue with the 'Delete Unused Stylesheet Selectors' function

I am reporting a regression that did not occur in version 2.8.1.
When running Delete Unused Stylesheet Selectors, both !important declarations and the + signs in unicode-range are removed from the stylesheet.

This issue is 100% reproducible with the following steps:
OS: Windows 11
Sigil 2.8.6 version
  1. Create an empty EPUB and add a stylesheet.
  2. Copy the following CSS into the stylesheet:
Code:
CSS
@font-face {
  font-family: "sans";
  src: url("../Fonts/KoPubDotum_ProMedium.otf");
  unicode-range: U+3000-301F, U+30FB, U+2026;
}

.test_important {
  margin: 2em 0 2em 0 !important;
}

.test_unused {

}
  1. Apply the class in an HTML file so that .test_important is not deleted:

Code:
<p class="test_important"><br/></p>
  1. Run Tools → Delete Unused Stylesheet Selectors.
  2. Check the CSS file. You will see that both the + signs in unicode-range and !important have been removed:

Code:
@font-face {
  font-family: "sans";
  src: url("../Fonts/KoPubDotum_ProMedium.otf");
  unicode-range: U3000-301F, U30FB, U2026;
}

.test_important {
  margin: 2em 0 2em 0;
}
byword is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Unused Stylesheet Selectors selects all my styles. jwes Sigil 4 05-29-2025 02:28 PM
"Delete unused stylesheet classes" problems with overloaded styles AlanHK Sigil 82 01-24-2021 12:10 PM
alphabetizing stylesheet, check book, and remove unused styles rjwse@aol.com Calibre 9 01-29-2020 07:48 PM
Cleaning a stylesheet of unused styles roger64 Sigil 49 06-13-2012 06:23 AM


All times are GMT -4. The time now is 02:22 AM.


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