![]() |
#46 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#47 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 316
Karma: 3200000
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
Mm, I don't know about all that. A search can't do the job of a human eye scanning a page and interpreting surrounding content to figure what's worth reading and what's not. But design decisions like that are subjective to a degree, which really just highlights the need for thoughtful CSS.
|
![]() |
![]() |
Advert | |
|
![]() |
#48 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#49 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
P.S. A text indent of 1em isn't too small for me, in fact it's my personal Goldilocks option. Not too big, not too small, just right.</nitpick> I have a personal calibre plugin which does epub surgical CSS tweaks via GUI point&clicks. Every now and again I think about releasing it into the wild. This thread is serving as a valuable reminder why it would be a Really Bad Idea. CSS preferences seem to be more of a Religion than a Science ![]() |
|
![]() |
![]() |
![]() |
#50 | ||
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
|
||
![]() |
![]() |
Advert | |
|
![]() |
#51 | |
Hmm.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 124
Karma: 2016606
Join Date: Oct 2015
Device: Android 4.2 Google Play Reader
|
Quote:
h2 {text-decoration:underline} h4 {text-decoration:underline} But that's just me. And the default <h4> is the same size as regular text. Which can be odd. |
|
![]() |
![]() |
![]() |
#52 | |
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
IMO, to support that, we need: 1. A standard way to create a group of related rules that the reader must either use all of or none of, e.g. for positioning and font control of a drop cap, for specifying foreground and background colors of an inverted block of text, etc. 2. A simple way to specify lengths in more complex ways, e.g. setting margin-left to .25" or a certain percentage of the width, whichever is greater, without using JavaScript. 3. Agreement from the reader vendors on a standard way to specify default styles so that when we have specific paragraphs that actually need to have (for example) no indent, we can guarantee that the reader won't do something stupid when the reader turns on paragraph indentation. 4. Agreement from the reader vendors to not do stupid things like Amazon does, where they forcibly set a minimum line height of 1.2, making drop caps and other such things a pain in the backside. 5. Agreement from the reader vendors on one standard way to specify the default body font, and one standard way in which it will be overridden by every vendor, so that Nook won't use styles in a different way that breaks fonts on headings, iBooks won't use styles in a different way that ends up breaking styles in spans, etc. 6. Agreement from the reader vendors to not use the universal selector in their reader stylesheets. Ever. And so on. |
|
![]() |
![]() |
![]() |
#53 | |
Karmaniac
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,553
Karma: 11499146
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
|
Quote:
For HTML, have you tried doing: Code:
<a href="" <h2>Heading underline</h2> </a> Code:
<u><h2>Heading underline</h2></u> |
|
![]() |
![]() |
![]() |
#54 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
Using stylesheets really, really makes your life a lot easier and creates cleaner code. |
|
![]() |
![]() |
![]() |
#55 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,964
Karma: 315160596
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
|
|
![]() |
![]() |
![]() |
#56 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Which is why you should use stylesheets. Use <h1>...<h6> as the structure requires them, and then use stylesheets to give them the look you want, making sure they are all larger than normal text, if that's your wish.
|
![]() |
![]() |
![]() |
#57 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
ProDigit, you seem to be thinking up every excuse under the sun for not using CSS, when it's hugely beneficial to do so. Having all your formatting instructions together in one place is enormously easier than applying formatting separately to each element in the book.
By having a CSS definition for your <p> tag you can instantly change the spacing and indentation for every paragraph in the book by editing one definition in the CSS. Surely you see the benefit of this compared to having to edit every paragraph individually if you want to change its indentation? |
![]() |
![]() |
![]() |
#58 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,771
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Besides, in CSS you can change the default font size of the H tags to whatever you want.
|
![]() |
![]() |
![]() |
#59 | |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Quote:
On my websites, I use tags all the way from H1 to H5. In my books, from H2 to H4. (It's not just font size, either; I use centered and flush left, italics and roman.) For the books: h2 { margin-top:1em; font-size: 150%; text-indent: 0em; font-style: italic; text-align:center; } h3 { margin-top:1em; font-size: 125%; text-indent: 0em; text-align:center; } h4 { margin-top:1em; font-size: 125%; text-indent: 0em; text-align:left; } Those being the chapter heads, major section breaks, and breakheads. (I am sure that most of you can guess why there is no H1: it originally was for the book title.) |
|
![]() |
![]() |
![]() |
#60 | |
Karmaniac
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,553
Karma: 11499146
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
|
Quote:
You could link the hyperlink to the TOC, or Index file (even to an external http link). Then again, you could do that in css as well, I guess... Any heading <H1> to <H4> reverts back to the index or some part of the book... Different scenario, when every heading links to different places. Then individual links are necessary, in which the heading will be underlined. Last edited by ProDigit; 12-23-2015 at 05:54 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Converting cm to em in css stylesheet | roger64 | ePub | 41 | 06-13-2014 01:00 PM |
Question: Find/Replace in css stylesheet | ElMiko | Sigil | 12 | 12-25-2011 06:29 AM |
ePub margins : @page vs stylesheet.css | Agama | Calibre | 1 | 08-16-2010 04:37 PM |
How to maintain a global CSS stylesheet | amoroso | Sigil | 7 | 07-18-2010 08:37 PM |
Where is the stylesheet.css? | roger64 | Sigil | 4 | 03-23-2010 02:12 PM |