View Single Post
Old 06-25-2025, 09:48 PM   #458
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,252
Karma: 5007213
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2025-06-25
- Scan CSS for @imports and url()s for more files to include. Don't include *all* fonts.

In answer to this issue, I've revisited how CSS is processed and included in split books.

The attached version scans all External (<link>'ed), Internal (<style>) and Inline (style= attrs) CSS used in all included html files for @imports and url() references for more files to include. That (typically) covers additional CSS files, images and font files.

What it does not do is 'render' the HTML to see which CSS rules are actually applied. So good odds of including extra files that are referenced, but not used.

Also, at this time, url() and @import that fail will fail 'loud' and raise an exception. This is deliberate (for now) so we see issues faster.

Last edited by JimmXinu; 07-31-2025 at 10:33 AM. Reason: remove obsolete test version
JimmXinu is offline   Reply With Quote