Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 10-11-2026, 06:44 AM   #1831
Zillion_
Enthusiast
Zillion_ began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Jul 2023
Device: Kindle ColorSoft
Using :has()

Hello, I have an issue trying to use :has() pseudo-class selectors in e-books.

Example:
.ChapterS:has(+.SubChapter) {
margin-bottom: 1em !important;
color: red !important;
}


The Kindle conversion logs show this:

Reading TOC from NCX...
Merging user specified metadata...
Detecting structure...
Inserting metadata into book...
Flattening CSS and remapping font sizes...
Ignoring CSS rule with invalid selector: '.ChapterS:has(+ blockquote)' (The pseudo-class :has() is unknown)
Ignoring CSS rule with invalid selector: '.ChapterS:has(+ .ChapterLocation)' (Expected an argument, got <DELIM '.' at 16>)
Ignoring CSS rule with invalid selector: '.ChapterS:has(+ .SubChapter)' (Expected an argument, got <DELIM '.' at 16>)
Ignoring CSS rule with invalid selector: '.ChapterS:has(+ blockquote)' (The pseudo-class :has() is unknown)
Ignoring CSS rule with invalid selector: '.ChapterS:has(+ .ChapterLocation)' (Expected an argument, got <DELIM '.' at 16>)
Ignoring CSS rule with invalid selector: '.ChapterS:has(+ .SubChapter)' (Expected an argument, got <DELIM '.' at 16>)
Ignoring CSS rule with invalid selector: '.ChapterS:has(+ blockquote)' (The pseudo-class :has() is unknown)


Calibre supports them correctly for the display in the editor (text displays correctly, tested with some color tags) but the conversion doesn't.
Is this an issue in Calibre or in KFX Output ? (unclear to me)
Zillion_ is offline   Reply With Quote
Old 10-11-2026, 09:14 AM   #1832
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,442
Karma: 96111109
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by Zillion_ View Post
Hello, I have an issue trying to use :has() pseudo-class selectors in e-books.
...
Calibre supports them correctly for the display in the editor (text displays correctly, tested with some color tags) but the conversion doesn't.
Is this an issue in Calibre or in KFX Output ? (unclear to me)
The error messages that start with "Ignoring CSS rule with invalid selector" are produced by calibre's conversion pipeline, not by this plugin. If you instead convert the same book from EPUB to AZW3 (therefore not using this plugin) you will see the same errors and will also see that calibre strips out those pseudo-classes during conversion.

Even if you avoid calibre's removal of those pseudo-classes by using the CLI of this plugin it still will not work because they are also unsupported by Amazon and will be silently discarded by Amazon's Kindle Previewer during conversion.
jhowell is offline   Reply With Quote
Old 10-11-2026, 04:29 PM   #1833
tomsem
Grand Sorcerer
tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.
 
Posts: 7,261
Karma: 28183005
Join Date: Apr 2009
Location: USA
Device: iPad Mini, Kindle Colorsoft, Kindle Scribe Colorsoft
Quote:
Originally Posted by jhowell View Post
There are also numerous, serious bugs in Kindle Previewer 4 that have not yet been fixed in the three quickly released updates to it. (I guess that Alexa is just not the best choice to use when vibe coding.)
Presumably these bugs are shared by Send To Kindle? Might be interesting to compare them.
tomsem is offline   Reply With Quote
Old 10-11-2026, 09:02 PM   #1834
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,442
Karma: 96111109
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by tomsem View Post
Presumably these bugs are shared by Send To Kindle? Might be interesting to compare them.
Most of the bugs seem to have been introduced in attempting to update to x64 MSIX in Windows and ARM in macOS. As far as I can tell the conversion done in Amazon’s servers for send-to-kindle happens under Linux and so it is not affected.
jhowell is offline   Reply With Quote
Old 10-12-2026, 11:47 AM   #1835
tomsem
Grand Sorcerer
tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.
 
Posts: 7,261
Karma: 28183005
Join Date: Apr 2009
Location: USA
Device: iPad Mini, Kindle Colorsoft, Kindle Scribe Colorsoft
Quote:
Originally Posted by jhowell View Post
Most of the bugs seem to have been introduced in attempting to update to x64 MSIX in Windows and ARM in macOS. As far as I can tell the conversion done in Amazon’s servers for send-to-kindle happens under Linux and so it is not affected.
That makes sense.

The three epub books that I reported problems with upthread, with entity in alt text are passing muster with STK (as well as Kindle Previewer 4.x). They were not passing when I tried the 3 ePubs weeks ago.

Last edited by tomsem; 10-12-2026 at 03:51 PM.
tomsem is offline   Reply With Quote
Old 10-12-2026, 05:28 PM   #1836
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,442
Karma: 96111109
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by tomsem View Post
That makes sense.

The three epub books that I reported problems with upthread, with entity in alt text are passing muster with STK (as well as Kindle Previewer 4.x). They were not passing when I tried the 3 ePubs weeks ago.
They are definitely fixing some of the conversion problems. If they would just fix the handling of SVG images I would strongly recommend upgrading to 4. As it is now it’s a toss up between 3 and 4 for the books I test with.
jhowell is offline   Reply With Quote
Reply

Tags
kfx, linux, wine


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Conversion Output] KePub Output Plugin jgoguen Plugins 588 03-28-2025 02:26 PM
Conversion output plugins? jgoguen Development 14 08-10-2013 11:19 AM
Output file name after conversion dbellefuil Calibre 2 06-14-2013 04:40 PM
catalogue builder output columns are not in the same order in the output KWhytte Library Management 5 12-04-2012 02:03 AM
Conversion output folders TechieLady Conversion 6 01-19-2012 02:49 AM


All times are GMT -4. The time now is 11:05 AM.


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