|
|
#1 |
|
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,049
Karma: 2006208
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, 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;
}
|
|
|
|
|
|
#2 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 793
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Sage
|
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 | |
|
|
|
|
#3 |
|
Bookish
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,049
Karma: 2006208
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, 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 06:06 AM. |
|
|
|
|
|
#4 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,789
Karma: 150249619
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. |
|
|
|
|
![]() |
|
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 09:33 AM |
| eBooks showing up on device library but NOT on "Content and Devices" | chipmunks | Calibre | 8 | 04-06-2021 12:02 AM |
| Question about "odd" behavior | cromag | Feedback | 10 | 01-05-2015 10:02 PM |
| Odd Sigil behavior = <span style="font-size: 0.9em;">??? | knadles | Sigil | 18 | 07-23-2013 05:59 PM |
| CSS odd behavior with ADE/Sony Reader | AbominableDavid | Sigil | 10 | 03-26-2010 10:16 PM |