Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 08-19-2022, 02:42 PM   #361
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: 76,465
Karma: 136564696
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 rockster View Post
I forget about that. Thanks.
That could be why the CSS code isn't working.

Your welcome.
JSWolf is offline   Reply With Quote
Old 08-29-2022, 08:25 AM   #362
ThomasSeeker
Junior Member
ThomasSeeker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2022
Device: Kindle
List of css-element identifiers?

Hey guys,

I searched the web without success for a list of all the css-element identifiers. Can someone help me please?

The most urgent one is the one for the background-colour of the highlighted text-sections (currently a really aggressive piss-yellow ... ;-))

Please help!
ThomasSeeker is offline   Reply With Quote
Old 08-29-2022, 02:46 PM   #363
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: 30,451
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
https://www.w3schools.com/cssref/default.asp

Just remember that all you see there does not apply (at all) to EPUB.
It may look fine in Calibre or Sigil preview, but the acid test is the REAL device
theducks is offline   Reply With Quote
Old 08-29-2022, 04:59 PM   #364
ThomasSeeker
Junior Member
ThomasSeeker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2022
Device: Kindle
Thank you theducks, for trying to help!

But in the list behind your link I did not find a working selector for highlighted text.

Somewhere else I found "::selection".

This is what I chose instead of the default piss-yellow:

::selection { color: white; background: #45b1e9;}

So beautiful! I'm happy now!

:-)
ThomasSeeker is offline   Reply With Quote
Old 08-29-2022, 05:05 PM   #365
ThomasSeeker
Junior Member
ThomasSeeker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2022
Device: Kindle
PS: Here is the list of the CSS Selectors:

https://www.w3schools.com/cssref/css_selectors.asp
ThomasSeeker is offline   Reply With Quote
Old 08-30-2022, 06:10 AM   #366
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: 76,465
Karma: 136564696
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 ThomasSeeker View Post
PS: Here is the list of the CSS Selectors:

https://www.w3schools.com/cssref/css_selectors.asp
But which ones are available for ePub? Not all of them are.
JSWolf is offline   Reply With Quote
Old 08-30-2022, 07:34 AM   #367
ThomasSeeker
Junior Member
ThomasSeeker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2022
Device: Kindle
Good question, JSWolf! ... I'd like to know too!
ThomasSeeker is offline   Reply With Quote
Old 08-30-2022, 09:37 AM   #368
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: 76,465
Karma: 136564696
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 ThomasSeeker View Post
Good question, JSWolf! ... I'd like to know too!
Once you figure out what's supported, you have to then figure out what's ePub 2 and what's ePub 3. And just because it's supposed to be supported, it may not be in some programs. So if you can do without them, do so and use a work around that does work.

For example, p::first-letter can be done away with by using a <span> to do the same thing.
JSWolf is offline   Reply With Quote
Old 10-01-2022, 07:42 PM   #369
echej
Junior Member
echej began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2021
Device: Kindle Paperwhite
Could anyone share a css that is similar to the one as in Calibre-web or in Apple Books?
echej is offline   Reply With Quote
Old 11-05-2022, 06:30 AM   #370
sanon
Member
sanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the endsanon knows the complete value of PI to the end
 
Posts: 16
Karma: 31960
Join Date: Apr 2016
Device: none
Hello everyone,

I've installed a new font, "Barlow Semi Condensed", and updated my css as follows:

p {
line-height: 1.6;
background-color: #4d4d4d;
font-family: "Barlow Semi Condensed" !important;
text-align: left !important;
}

Doesn't seem to be working though... The font has changed into something but it's not BSC. What am I doing incorrectly? Thanks.

EDIT: Solution for anyone interested:
Windows, for whatever reason, has installed 4 out of 18 "Barlow Semi Condensed" fontfaces under "Barlow". These are "regular", "italic", "bold" and "bold italic". So, "font-family: Barlow !important;" is the solution.

Any idea why Windows does this and how to fix it?

Last edited by sanon; 11-05-2022 at 06:49 AM.
sanon is offline   Reply With Quote
Old 01-21-2023, 12:31 PM   #371
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,278
Karma: 6433040
Join Date: Sep 2020
Device: Calibre E-book viewer
Today I needed to add spacing between paragraphs, but couldn't find a rule that would stick, then after several unsuccessful attempts I found this:

https://stackoverflow.com/questions/...34345#25234345

Now I'm using:

p + p {margin-top: 0.4em !important;}
Comfy.n is online now   Reply With Quote
Old 02-10-2023, 04:27 AM   #372
Abhi
Junior Member
Abhi began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2023
Device: none
Smile My css for calibre eBook viewer

Scrapped from Android eBook reader


Quote:
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative&family=Libre+Baskerv ille&display=swap');

strong {color: #00B095;font-weight: 900;font-size: 105%;}

em, i {color: #FF9E00;font-weight: 900;font-size: 105%;}

span {display: inline;}

body {font-family: 'Libre Baskerville', serif;background-color: #988E7A;color: #191919;padding: 10px;word-wrap: break-word;}

img {max-width: 100%;}

h1, h2, h3, h4, h5, h6 {font-family: 'Cinzel Decorative',cursive;text-align: center;color: #FFF;font-weight: 400}

hr {border: 2px solid; border-radius: 2px;}
Abhi is offline   Reply With Quote
Old 08-20-2023, 07:10 PM   #373
aldobelus
Junior Member
aldobelus began at the beginning.
 
aldobelus's Avatar
 
Posts: 1
Karma: 10
Join Date: Aug 2023
Location: Cantabria.
Device: none
Quote:
Originally Posted by sideburnt View Post
If you're interested in CSS Styling take a quick look at
http://epubzengarden.com/?style=trad.../chapter1.html

Its a very new site but could become fantastic with a bit of contribution.

Hard to navigate around and took me a while to find the css preview page, I have linked to my favorite page style used on this site.
At this site there's nothing to be interested. It's a different text, nothing to do with CSS.
aldobelus is offline   Reply With Quote
Old 08-21-2023, 04:24 PM   #374
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,538
Karma: 309500000
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by aldobelus View Post
At this site there's nothing to be interested. It's a different text, nothing to do with CSS.
That's because you're reading and commenting on a 14-year old post.

You might be able to find old versions at the internet archive, although they might not be functional. Here's the About page from 2009:

https://web.archive.org/web/20090825...den.com/about/
pdurrant is offline   Reply With Quote
Old 05-26-2024, 09:08 AM   #375
onyxmage
Junior Member
onyxmage is on a distinguished road
 
Posts: 2
Karma: 50
Join Date: Mar 2023
Device: Onyx Boox Leaf 2
Here's a css styling for people who prefers a 1-page view for the paginated mode in the calibre viewer:

Quote:
body.calibre-viewer-paginated *,
body.calibre-viewer-scrolling *{
margin: auto !important;
}

body.calibre-viewer-paginated p,
body.calibre-viewer-scrolling p{
max-width: 70ch !important;
padding: 0 1em 1em 1em !important;
}
This handles the left and right margins of the view better than the settings, and adjusts well to resize. The caveat is it causes some stuttering on dynamic resize.
onyxmage is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom CSS for output deckoff Calibre 1 08-29-2010 12:55 AM
ePub with custom .css on a 505 dicknskip Sony Reader Dev Corner 3 06-10-2010 12:34 AM
User stylesheets for ePub files salty-horse Sony Reader Dev Corner 12 02-23-2010 08:44 AM
ePub conversion: override existing css with a custom one sbin Calibre 1 01-09-2010 05:03 AM
Calibre's generated css for epub brewt Calibre 7 12-29-2008 10:59 AM


All times are GMT -4. The time now is 05:38 AM.


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