User style tweak not working
#1  sladflob 05-21-2019, 11:16 PM
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?


#2  sladflob 05-22-2019, 01:15 AM
So I added !important to hr.transition and it now works. Does this mean the user tweaks get applied before the document css?

#3  Frenzie 05-22-2019, 02:42 PM
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.

PS You'll note that all (?) of the bundled style tweaks also include !important.

#4  sladflob 05-23-2019, 06:08 AM
Quote Frenzie
PS You'll note that all (?) of the bundled style tweaks also include !important.
Thanks, good to know I'm not missing anything.

Today's Posts | Search this Thread | Login | Register