Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-20-2022, 04:37 AM   #1
pickyaxe
Addict
pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.
 
Posts: 288
Karma: 3762916
Join Date: Nov 2011
Device: none
Global CSS rule to modify all monospace text?

I confess I don't know much CSS. What I would like is some way to modify all text that is declared as
Code:
font-family: monospace
or
Code:
<span class="monospaced">
to have a smaller font size. This is because all monospace fonts are just a little larger than the non-monospace fonts which is annoying in programming eBooks (for example).

I can manually set
Code:
font-size: 0.9em;
for code blocks in the relevant ePub, but if there was a way to do this for all books via a global tweak, that would be great.
pickyaxe is offline   Reply With Quote
Old 04-20-2022, 06:17 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,130
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by pickyaxe View Post
I confess I don't know much CSS. What I would like is some way to modify all text that is declared as
Code:
font-family: monospace
or
Code:
<span class="monospaced">
to have a smaller font size. This is because all monospace fonts are just a little larger than the non-monospace fonts which is annoying in programming eBooks (for example).

I can manually set
Code:
font-size: 0.9em;
for code blocks in the relevant ePub, but if there was a way to do this for all books via a global tweak, that would be great.
What are you using to read your eBooks?
JSWolf is offline   Reply With Quote
Advert
Old 04-20-2022, 06:54 AM   #3
pickyaxe
Addict
pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.
 
Posts: 288
Karma: 3762916
Join Date: Nov 2011
Device: none
Quote:
Originally Posted by JSWolf View Post
What are you using to read your eBooks?
As in, what software? I'm using KOReader on a Kobo Elipsa. It's possible to make global style tweaks using the "Style tweaks" feature.

As an example, it would be lovely if I could make an rule that works for all saved Wikipedia articles.
pickyaxe is offline   Reply With Quote
Old 04-20-2022, 12:22 PM   #4
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,742
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by pickyaxe View Post
Code:
<span class="monospaced">
That one you can target with something like:

Code:
.monospaced {
  font-size: .9em !important;
}
You can't target font-family: monospace. ;-)
Frenzie is offline   Reply With Quote
Old 04-20-2022, 04:21 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,130
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
But not every eBook will use the same CSS for monospace. So while you can deal with some, you cannot deal with all.

Is there a way in KOReader to change the font used for monospace? That would solve the problem by finding a replacement monospace font that fits.
JSWolf is offline   Reply With Quote
Advert
Old 04-20-2022, 08:40 PM   #6
embryo
Fanatic
embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.
 
embryo's Avatar
 
Posts: 523
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
What I use is:
Code:
pre, xmp {
    font-size: 80% !important;
}
embryo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KOreader rendering: CSS rule after @namespace ignored maraskan_user KOReader 4 01-27-2021 05:58 AM
modify permanently pocketnews.css duns PocketBook Developer's Corner 0 01-13-2019 10:21 AM
batch modify a CSS property? roger64 ePub 4 09-29-2017 05:12 PM
Confusing global definitions in css bfollowell ePub 14 03-23-2014 09:21 PM
Global css triplemaya Sigil 9 12-04-2011 07:17 PM


All times are GMT -4. The time now is 10:28 PM.


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