04-10-2024, 09:58 AM | #31 |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
That rule doesn't exist; it was created for lazy men. Epubs must be epub3 with fallback code for epub2, so the users with a proper device can get the best reading experience. Look at these pictures:
And now after increasing the font size: Those pictures are from "Alice in wonderland" and belong to Kobo for Android. Try doing the same with basic css code; you won't be able; you'll have a lot of blank spaces here and there. The best reading experience can't be get with "KISS" code. |
04-10-2024, 10:05 AM | #32 | |
Resident Curmudgeon
Posts: 76,433
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Advert | |
|
04-10-2024, 10:54 AM | #33 |
A Hairy Wizard
Posts: 3,225
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
KISS as applied in the html page… don’t add all those extra tags when most of the time they are unneeded.
KISS as applied to the stylesheet… use the most efficient css to achieve your goal while providing fallback for the older/inadequate devices. |
04-10-2024, 01:05 PM | #34 | |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
and after increasing the font-size: Those pictures are taken from Kobo for Android. And they represent layouts very common. How do you code that in a simpler way? One line of text at top, one line at bottom and a perfect centered line (and the layout is retained no matter the font size). The simpler code is: 1) In the xhtml: Code:
<div class="block"> <p>Line One</p> <p>Line Two</p> <p>Line Three</p> </div> 2) In the .css: Code:
p { margin: 0; } .block { display: flex; flex-flow: column nowrap; justify-content: space-between; align-content: center; align-items: center; height: 99vh; border: 2px solid red; margin: 0; } .block p:nth-child(2n+1) { padding: 5% 0; } .block p:nth-child(2) { font-size: 2em; font-weight: bold; } Last edited by RbnJrg; 04-10-2024 at 01:08 PM. |
|
04-10-2024, 01:14 PM | #35 | |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
I particularly dislike contrived code like this: Code:
<p class="first"><span class="big">W</span><small>E WENT TO A</small> L<small>ED</small> Z<small>EPPELIN CONCERT IN</small> 1972.</p> |
|
Advert | |
|
04-10-2024, 02:45 PM | #36 | |
Resident Curmudgeon
Posts: 76,433
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
04-10-2024, 04:46 PM | #37 |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
You must have made a mistake. It DOES work in Thorium:
and also in ADE 4.x: It works everywhere that supports flex-box. But the point is not that. The point is that one can employ "fancy" code for simple layouts, so users with a proper device can get the best reading experience, and since you also have included fallback code, users with old device will get a suboptimal output. With flex-box, you'll get all perfectly spaced, no need to calc margins, no need to worry about anything. And all always perfect no matter if the font-size is increased. As I said, you can't get that with only css2 properties (of course, you'll have to employ them because of the fallback code, but the result won't be so good for all of them with old devices). |
04-10-2024, 04:58 PM | #38 |
Bibliophagist
Posts: 40,549
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For the most part, I will use the latest CSS supported by my devices for ebooks for my own use. After all, if I see any issues, working around them is a great learning experience and annoys no one other than me.
When I am working on ebooks for others which for the most part are intended to be published via KDP, I tend towards a simpler approach that will work on multiple devices without needing to get into the wonderful world of media queries and will not trigger errors during the conversion process. This at times has also been a learning experience since KDP's documentation and reality often do not have a one to one congruence. |
04-10-2024, 05:47 PM | #39 | ||
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Quote:
|
||
04-11-2024, 06:36 AM | #40 |
Resident Curmudgeon
Posts: 76,433
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If I was creating an eBook for sale, I would test it on a Kobo in ePub and KePub. That way, I'd know what code that would need to be changed to work with ePub on a Kobo. Once that's done, I'm pretty much assured the eBook will work with most software to display ePub. It can be an ePub 3 with full accessibility and still work.
|
04-12-2024, 01:46 AM | #41 |
Bibliophagist
Posts: 40,549
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Unfortunately, most authors consider Amazon to be their most important market. Something about 90% of ebook sales whispers money in their ears. Sadly, being dedicated to eating and keeping a roof over their heads, filthy lucre attracts them faster than moths to a light.
|
04-12-2024, 07:43 AM | #42 | |
the rook, bossing Never.
Posts: 12,360
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
The Alice example won't be good on a phone and on Amazon it would need to be either images each on their own line (to suit phones) and/or as Print Replica/PDF wrapped. Since it's for children and smallest read on paper and next up is kids' tablets I'd do an epub2 with images each on their own line that works on 100% or eink and all Kindle, Kobo, Nook, epub apps on phones AND a pdf on POD (paper) and offered as PDF/Print replica on tablet. Maybe 99.9% or more of novels (not text books or children's books) have no benefit from Indesign, Vellum or handcrafted epub3. Some epub3 are simply convoluted alternatives with no mainstream publishing outlet for either PDF or apps. The Alice book is totally untypical of novels for grown ups or even teenagers. Modern equivalent would be the "Wizard of Once" series and "How to Train your Dragon" series. I know kids that read those and have ereaders and tablets. They read stuff like that on paper. I agree replicatating those as a somewhat reflowable ebooks would use epub3. They have nothing that would read such an ebook (though probably something could be installed on the iPads or Fire tablet), but could manage PDF (or Kindle Print Replica based on PDF). |
|
04-12-2024, 10:52 AM | #43 | |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
By the way, "Alice" under epub3, looks great on phones; no matter if the user changes the font size, the complex layout of the ebook can be reproduced and retained (the screenshoots taken from Kobo for Android are a sample). Another thing is Kindle; there, with the KFX format the Alice layout can't be reproduced; all I wrote is regarding the epub world; with regards the Amazon world, I don't say any word. Last edited by RbnJrg; 04-12-2024 at 02:44 PM. |
|
08-12-2024, 08:01 PM | #44 | |
Member
Posts: 21
Karma: 10
Join Date: Jun 2021
Device: Kobo Sage, Libra Colour
|
Quote:
|
|
08-12-2024, 08:21 PM | #45 |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
Tags |
epub, kepub, kobo, kobo sage, pseudo-elements |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mangled em-dash as a CSS pseudo-element | sujato | Viewer | 2 | 08-02-2022 06:47 AM |
To cite ePubs: Do you recommend an ID attribute for every single element? | ibu | ePub | 12 | 08-08-2013 06:03 AM |
Default line-height in epubs | Derek R | ePub | 2 | 02-13-2012 12:23 PM |
Touch Problem with all epubs, my epubs, or my kobo? (line clipping) | plague006 | Kobo Reader | 14 | 12-03-2011 12:32 AM |
Command Line Batch Adding of Epubs | nkormanik | Calibre | 6 | 10-19-2010 09:04 AM |