Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 11-02-2020, 05:31 PM   #1
junglebrad
Junior Member
junglebrad began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2020
Device: Calibre
Help with creating a CSS for Tufte

I really like the style of Tufte CSS and I would appreciate help with what code to put into Calibre's style window.

Here is the example:

https://edwardtufte.github.io/tufte-css/
junglebrad is offline   Reply With Quote
Old 11-02-2020, 07:08 PM   #2
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,586
Karma: 14328510
Join Date: Nov 2019
Device: none
Don't use this: "Tufte CSS uses #fffff8 and #111111 because they are nearly indistinguishable from their ‘pure’ cousins, but dial down the harsh contrast." So delete lines 53 and 54.

On an ereader the colors black and white are the only safe colors to use. You could use grays, but sparingly, e.g., for rules, and they may wash out and disappear. Instead of specifying black for color use "inherit", and don't specify a background color; that's because the user can change the setting to make the ereader display white text on a black background for night mode.

Line 55, max-width, is likely also not a good idea for an ereader. Delete it.

Likewise line 48; let the user set the width on their ereader. Same with line 51. Delete those.

Delete line 44; again, let the user choose on their ereader.

What I have for the body tag are:
border: 0;
font-style: normal;
hyphens: auto;
margin: 0;
padding: 0;
width: auto;

I'm not a fan of spacing above or below paragraphs so what I have for the p tag is
margin: 0;
padding: 0;
text-indent: 2em;

(I like a hefty indent.)

Get rid of the embedded fonts. Some of us have font preferences and have dodgy eyes.

Figure out which of the tags he's using can be used in which version of epub or kindle. For epub some of them can't be used with epub 2.

Last edited by hobnail; 11-02-2020 at 07:11 PM.
hobnail is offline   Reply With Quote
Advert
Old 11-02-2020, 07:17 PM   #3
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,586
Karma: 14328510
Join Date: Nov 2019
Device: none
Also note that he's using ragged right text alignment. I prefer that but my impression is that most don't like that. On a kindle once you use text-align: left; or text-align: justify; it's cast in stone and the user can't change it (unless maybe it's a kfx file). On the kobo, which is epub, if you don't use either of those the user can change the alignment to either fully justified or ragged right.
hobnail is offline   Reply With Quote
Old 11-02-2020, 09:04 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,149
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by junglebrad View Post
I really like the style of Tufte CSS and I would appreciate help with what code to put into Calibre's style window.

Here is the example:

https://edwardtufte.github.io/tufte-css/
Note to mention the love for such things as sidenotes that, being kind, suck in a epub ebook. Even on a webpage, they tend to be annoying since you need a wide margin to place them in.
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pagestyle.css extra / integrated in stylesheet.css / or not at all? chaot Workshop 14 02-24-2017 11:10 PM
ADE breaks CSS --> CSS Validation: Parse Error / Value Error dasboeh ePub 4 12-10-2012 03:25 AM
CSS Question: creating borders... ElMiko Sigil 11 09-19-2012 04:04 AM
Override ePub CSS with userStyle.css? barium Sony Reader Dev Corner 11 07-16-2011 03:25 PM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM


All times are GMT -4. The time now is 09:45 PM.


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