![]() |
#1 |
Junior Member
![]() 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/ |
![]() |
![]() |
![]() |
#2 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#4 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,149
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |