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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2020, 07:03 PM   #1
carmenchu
Zealot
carmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to all
 
Posts: 139
Karma: 159672
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
Viewer: bug or feature?

Hello!
I find that the e-viewer disregards
Code:
body {color: #000040; background: #f0f0f0; padding: 20px;}
in the css of an epub.
I am NOT in dark mode, 'override all book colors' set at 'never', color scheme is 'system'.
I have just 2 books with background-color set--both guides to python plug-ins for the Gimp, made from retrieved web pages, and I have tried to preserve in some measure the layout of the sources.
Am I doing something wrong, or the viewer will always override a body background-color?
(Note: Sigil shows the background color as in the css.)
carmenchu is offline   Reply With Quote
Old 03-25-2020, 07:14 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 24,775
Karma: 34257999
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
In the Viewer, use the Preferences THERE

Set the override to Never
Attached Thumbnails
Click image for larger version

Name:	ViewerColors.PNG
Views:	20
Size:	16.3 KB
ID:	177911  
theducks is offline   Reply With Quote
Old 03-25-2020, 07:24 PM   #3
carmenchu
Zealot
carmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to all
 
Posts: 139
Karma: 159672
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
Is there that I have my preferences set:
'override all book colors' ='never', 'color scheme' = 'system' (I just want a background color when the book asks for it).
carmenchu is offline   Reply With Quote
Old 03-25-2020, 09:19 PM   #4
retiredbiker
Zealot
retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.
 
retiredbiker's Avatar
 
Posts: 126
Karma: 29896
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Quote:
Originally Posted by carmenchu View Post
Is there that I have my preferences set:
'override all book colors' ='never', 'color scheme' = 'system' (I just want a background color when the book asks for it).
I ran into this a while ago but got distracted and left it. Just did some tests now. I find that if I use a background-color rule in a <div>, for example a side note, it works in both the editor preview and the viewer. But if I put it in the <body> style, it shows in the editor preview but not the viewer.

(Same settings as yours, Calibre 4.12 on Ubuntu.)

So you could wrap each whole file with a suitable <div> to get the effect, but it would be better if it worked in the <body> style.
retiredbiker is offline   Reply With Quote
Old 03-25-2020, 09:40 PM   #5
retiredbiker
Zealot
retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.
 
retiredbiker's Avatar
 
Posts: 126
Karma: 29896
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
Found an Answer

More new features to learn. There is a tool on the viewer called "switch color scheme". Set it to "Easy" and the color called for in the <body> works. Mine was set to "White".
Attached Thumbnails
Click image for larger version

Name:	setting.jpg
Views:	19
Size:	121.3 KB
ID:	177920  
retiredbiker is offline   Reply With Quote
Old 03-25-2020, 10:01 PM   #6
retiredbiker
Zealot
retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.
 
retiredbiker's Avatar
 
Posts: 126
Karma: 29896
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
OOPS.

I tried another book, and it turns out "Easy" must be for "easy on the eyes" or something. The book I tested had a body color nearly identical to what the "Easy" setting gives, so it fooled me

Problem remains.
retiredbiker is offline   Reply With Quote
Old 03-25-2020, 10:13 PM   #7
carmenchu
Zealot
carmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to all
 
Posts: 139
Karma: 159672
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
Exactly so. Moreover,
* One would wish for an option to respect the color if/when present: 'override=never' *should* do thar, but apparently doesn't
* 'Easy' must an option in Linux?--in Windows there are others/other names, and so I dare say in Mac...
carmenchu is offline   Reply With Quote
Old 03-26-2020, 12:04 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 36,241
Karma: 16098999
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Body colors are always going to be changed to the user specified color. Not changing those makes the viewers color themes basically useless.
kovidgoyal is offline   Reply With Quote
Old 03-26-2020, 08:37 AM   #9
carmenchu
Zealot
carmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to all
 
Posts: 139
Karma: 159672
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
Understood: but what if one doesn't want a color teme inside the book-view frame?
(My case: quite happy to let each book--mostly customized by me--show its own layout.)
carmenchu is offline   Reply With Quote
Old 03-26-2020, 10:12 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 36,241
Karma: 16098999
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Wrap your books content in a div.
kovidgoyal is offline   Reply With Quote
Old 03-26-2020, 11:11 AM   #11
carmenchu
Zealot
carmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to allcarmenchu is a name known to all
 
Posts: 139
Karma: 159672
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
Quote:
Originally Posted by kovidgoyal View Post
Wrap your books content in a div.
Of course... I wished to avoid some additional 25 <div class="...">...</div> tags.
Thanks, anyway.
carmenchu 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
Bug or feature? Onion Ninja Calibre 1 08-15-2017 08:58 AM
Possible viewer bug? itimpi Library Management 19 05-13-2014 12:29 PM
Another bug ... or a feature? sergo Conversion 4 11-29-2013 06:21 AM
Bug or Feature? capidamonte Calibre 5 07-27-2010 03:06 PM


All times are GMT -4. The time now is 07:56 AM.


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