Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 04:51 PM   #1
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: 80,431
Karma: 150249609
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
KoboTouch driver extra CSS in calibre 8

Would it be possible to modify the extra CSS in the KoboTouch driver for calibre 8 to allow us to have different CSS based on ePub or KePub? Thanks.
JSWolf is offline   Reply With Quote
Old Yesterday, 05:34 PM   #2
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,261
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
With a bit of creativity, you can (sort of) do this already using the existing single override file, kobo_extra.css.

For example, by taking advantage of the "special Kobo <div>s" which have traditionally been injected during the on-the-fly epub --> kepub transformation:
Code:
/* Put all your epub-specific CSS rules first */

div#book-columns > div#book-inner {
    /* Put all your kepub-specific CSS rules here */
}
The epub will ignore the rules in the bottom half because it doesn't contain the special Kobo <div>s . The kepub won't ignore the rules in the top half but the bottom half rules come later in the CSS file so can override the rules in the top half if they conflict.

How well it works may depend on what kind of CSS differences you want for epub vs. kepub.

Last edited by jackie_w; Yesterday at 05:37 PM.
jackie_w is offline   Reply With Quote
Advert
Old Today, 05:58 AM   #3
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: 80,431
Karma: 150249609
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 jackie_w View Post
With a bit of creativity, you can (sort of) do this already using the existing single override file, kobo_extra.css.

For example, by taking advantage of the "special Kobo <div>s" which have traditionally been injected during the on-the-fly epub --> kepub transformation:
Code:
/* Put all your epub-specific CSS rules first */

div#book-columns > div#book-inner {
    /* Put all your kepub-specific CSS rules here */
}
The epub will ignore the rules in the bottom half because it doesn't contain the special Kobo <div>s . The kepub won't ignore the rules in the top half but the bottom half rules come later in the CSS file so can override the rules in the top half if they conflict.

How well it works may depend on what kind of CSS differences you want for epub vs. kepub.
Given the state of the patches on the current firmware, the idea was to use the extra CSS to just add CSS to KePub to make the font sizes the same or similar to ePub.
JSWolf is offline   Reply With Quote
Old Today, 11:40 AM   #4
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,261
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by JSWolf View Post
Given the state of the patches on the current firmware, the idea was to use the extra CSS to just add CSS to KePub to make the font sizes the same or similar to ePub.
My suggestion above should work for that scenario.

I just tried the following in the kobo_extra.css file on my Clara 2E running fw4.38.23429 without patch Unify font sizes.

Code:
/* This will be ignored by epubs */
div#book-columns > div#book-inner {
    font-size: 1.85em;
    }
It works OK for me. You may need to fine-tune the 1.85em value to suit yourself.

ETA: Of course if patch Unify font sizes resurrects itself in the next firmware then you'd need to resend all your kepubs to remove the font-size hack.

Last edited by jackie_w; Today at 11:44 AM. Reason: ETA
jackie_w is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Device Plugin] KoboTouch - Metaguide Driver (intellireading) 0x6f677548 Plugins 13 09-10-2025 08:16 AM
KoboTouch driver & SeriesID ownedbycats Devices 36 07-07-2024 12:12 PM
Bug with Subtitle in KoboTouch Driver 2.5.1 JSWolf Devices 2 01-01-2021 09:35 AM
[Device Plugin]KoboTouch driver for calibre 1.48 davidfor Plugins 4 12-27-2015 06:03 AM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM


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


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