Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-21-2019, 11:16 PM   #1
sladflob
Enthusiast
sladflob began at the beginning.
 
Posts: 30
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!
sladflob is offline   Reply With Quote
Old 05-22-2019, 01:15 AM   #2
sladflob
Enthusiast
sladflob began at the beginning.
 
Posts: 30
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?
sladflob is offline   Reply With Quote
Advert
Old 05-22-2019, 02:42 PM   #3
Frenzie
Guru
Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.
 
Posts: 680
Karma: 115152
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.
Frenzie is offline   Reply With Quote
Old 05-23-2019, 06:08 AM   #4
sladflob
Enthusiast
sladflob began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Feb 2013
Device: Kobo Touch, Aura One
Quote:
Originally Posted by Frenzie View Post
PS You'll note that all (?) of the bundled style tweaks also include !important.
Thanks, good to know I'm not missing anything.
sladflob is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


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


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