Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-21-2019, 11:16 PM   #1
sladflob
Connoisseur
sladflob began at the beginning.
 
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!
sladflob is offline   Reply With Quote
Old 05-22-2019, 01:15 AM   #2
sladflob
Connoisseur
sladflob began at the beginning.
 
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?
sladflob is offline   Reply With Quote
Old 05-22-2019, 02:42 PM   #3
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,615
Karma: 724945
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
Connoisseur
sladflob began at the beginning.
 
Posts: 63
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
Old 07-28-2021, 02:11 AM   #5
Pokec
Member
Pokec began at the beginning.
 
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?
Pokec is offline   Reply With Quote
Reply


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 08:15 AM.


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