Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2023, 04:04 PM   #1
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 939
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;
}
I have an ebook in which it is used for creating dot trailers/leaders in some table of contents construct, but the dots never show within kobo, while they can be observed in the calibre viewer/editor.
DrChiper is offline   Reply With Quote
Old 07-16-2023, 09:12 PM   #2
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
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.
enuddleyarbl is offline   Reply With Quote
Advert
Old 07-17-2023, 05:01 AM   #3
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 939
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: " ";
 . . .
}
so you would not see it anyway.

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%;
}
Placing such a book on my kobo did reveal that the picture did show up on my PC (within calibre), but not on the kobo (=empty space).
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.
DrChiper is offline   Reply With Quote
Old 07-17-2023, 02:54 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,964
Karma: 131375774
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DrChiper View Post
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: " ";
 . . .
}
so you would not see it anyway.

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%;
}
Placing such a book on my kobo did reveal that the picture did show up on my PC (within calibre), but not on the kobo (=empty space).
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.
Pseudo elements will not work with ePub on a Kobo because the version of RMSDK (ADE) used to read ePub is too old. It should work with KePub.

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.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 09:15 PM.


MobileRead.com is a privately owned, operated and funded community.