07-16-2023, 04:04 PM | #1 |
Bookish
Posts: 946
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Libra Color, Nxtpaper 11
|
Odd behavior CSS "content" property in kobo devices
Can anybody confirm that an ::after pseudo-element with a content property does not work for kobo devices?
Like: Code:
.title::after { position: absolute; content: " . . . . . . . "; text-align: right; } |
07-16-2023, 09:12 PM | #2 |
Guru
Posts: 741
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
I've got a couple of classes in my standard stylesheet using ::after and don't have any problems with them on my Kobos. I'm not knowledgeable enough on this to give you a solution. But, I worry about your "position: absolute" without specifying actual positions or widths.
|
Advert | |
|
07-17-2023, 05:01 AM | #3 |
Bookish
Posts: 946
Karma: 1803094
Join Date: Jun 2011
Device: PC, t1, t2, t3, aura 2 v1, clara HD, Libra 2, Libra Color, Nxtpaper 11
|
Well, I did some investigations and found that of my 20K+ books just about 30 did use the content property, and most of them in the form of:
Code:
.something::after { content: " "; . . . } My technical library however made intensive usage of that construct, like: Code:
section[data-type="titlepage"]:after { content: url(../Images/ebook.png); position: absolute; bottom: 0; max-width: 100%; } Therefore my preliminary conclusion is that kobo ignores the content property. The ::after (and ::before) pseudo-element(s) do work however. To be complete: the used ebooks were epubs, not kepub. Last edited by DrChiper; 07-17-2023 at 05:06 AM. |
07-17-2023, 02:54 PM | #4 | |
Resident Curmudgeon
Posts: 75,761
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
This is why these eBooks should not be using Pseudo elememnts and should be using spans instead. It's best ti make the ePub as backwards compatible as possible. |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre 6.11: "Remove CSS Rules" and "Check Book" Conflicts | enuddleyarbl | Editor | 10 | 01-08-2023 08:33 AM |
eBooks showing up on device library but NOT on "Content and Devices" | chipmunks | Calibre | 8 | 04-05-2021 11:02 PM |
Question about "odd" behavior | cromag | Feedback | 10 | 01-05-2015 09:02 PM |
Odd Sigil behavior = <span style="font-size: 0.9em;">??? | knadles | Sigil | 18 | 07-23-2013 04:59 PM |
CSS odd behavior with ADE/Sony Reader | AbominableDavid | Sigil | 10 | 03-26-2010 09:16 PM |