![]() |
#1 |
Connoisseur
![]() Posts: 63
Karma: 10
Join Date: Feb 2013
Device: Kobo Touch, Aura One
|
User style tweak not working
Hi, I have a few epubs that contain <hr class="transition" /> in them. These are rendered in KOReader by a horizontal line which I would like to get rid of.
I know I can edit the .css for the book in Calibre and change them to display:none, but I thought it would be more fun to do it by adding a user style tweak to the styletweaks directory. I've created a file no-cr.css in that folder and tried .transition { display:none; }, hr.transition { display:none; }, and hr { display: none; } (and even all three in the same file) but none of them seem to do the trick. Am I missing something about how/when the user style tweaks are processed? What is the right way to do this? Thanks! |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() Posts: 63
Karma: 10
Join Date: Feb 2013
Device: Kobo Touch, Aura One
|
So I added !important to hr.transition and it now works. Does this mean the user tweaks get applied before the document css?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,742
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Per spec, as a user you're stuck with !important to override stuff. Which I consider a flaw in the spec because it makes it harder to perform targeted overrides, but that aside.
https://www.w3.org/TR/2011/REC-CSS2-...ascading-order PS You'll note that all (?) of the bundled style tweaks also include !important. |
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() Posts: 63
Karma: 10
Join Date: Feb 2013
Device: Kobo Touch, Aura One
|
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 25
Karma: 10
Join Date: Sep 2015
Device: PB628 Touch Lux 5
|
It seems to me that the options "Ignore publisher font families", "Ignore publisher font sizes" etc in the "Style tweaks" menu will also cause corresponding settings in "User style tweaks" to be ignored.
Is this how it is intended? |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cahnging Calibre user interface style is not working | Ghea | Calibre | 2 | 09-05-2014 05:58 AM |
Is the user style mod for story hd still working in the latest 1.34US firmware? | JC_Yang | iRiver Story | 4 | 10-22-2013 12:00 PM |
Series # tweak not working | theducks | Library Management | 15 | 09-01-2011 09:46 AM |
Article tweak for title sort not working | Manichean | Calibre | 2 | 10-04-2010 11:56 AM |
Tweak to User Manual | edbro | Calibre | 1 | 07-24-2010 11:26 AM |