![]() |
#1171 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,637
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I've tested the new plugin and I've found a problem: I have a paragraph in my stylesheet with margin-bottom: 10% and margin-top: 15%. With the new plugin that format is not honored, and the margin disappears.
|
![]() |
![]() |
![]() |
#1172 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,637
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Could the reason be this?
Code:
margin-top: 0 !important; margin-bottom: 0 !important; |
![]() |
![]() |
![]() |
#1173 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
I haven't tested it, but looking at the code I think this rule in style-hacks.css:
Code:
div#book-inner * { margin-top: 0 !important; margin-bottom: 0 !important; } Code:
div#book-inner { margin-top: 0 !important; margin-bottom: 0 !important; } Last edited by GeoffR; 01-14-2015 at 04:53 AM. Reason: why is style-hacks.css needed at all? |
![]() |
![]() |
![]() |
#1174 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,637
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Something like that, it's overwriting all margin-top and margin-bottom in the user stylesheet, I'm afraid.
|
![]() |
![]() |
![]() |
#1175 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
I'm fairly sure style-hacks.css should not be present in the driver, if anyone wants those styles then they can always add them using kobo_extra.css.
|
![]() |
![]() |
![]() |
#1176 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,637
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I totally agree with that.
|
![]() |
![]() |
![]() |
#1177 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
But then again, maybe some rules are needed to prevent more general div styles in the book from being applied to the divs added by the driver, something like this?
Code:
div#book-columns, div#book-inner { margin: 0 0 0 0; padding: 0 0 0 0; } |
![]() |
![]() |
![]() |
#1178 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,637
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Defining only those styles? Why div#book-columns and not div.book-columns? But I think that, perhaps, only that. It shouldn't modify anything else, neither paragraphs nor links.
|
![]() |
![]() |
![]() |
#1179 |
Generally Awesome Person
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
'#' instead of '.' because of how CSS selectors work. I'll tweak the CSS file and post a new version sometime in the next few hours.
It's needed to match what the Kobo files have in their inline styles. But yea, '!important' seems excessive. |
![]() |
![]() |
![]() |
#1180 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
FWIW, I used Kobo's inline CSS verbatim. I'm far from being a CSS wizard, so I'll leave you all to decide what the best course of action is
![]() |
![]() |
![]() |
![]() |
#1181 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,637
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
The problem with !important is that override any other definition, so your styles go through the windows
![]() |
![]() |
![]() |
![]() |
#1182 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,637
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I've modified my kepub editing sylehack.css so the llast lines are:
Code:
div#book-inner { margin-top: 0 ; margin-bottom: 0 ; } With this, margins are again the ones defined in the stylesheet.. Last edited by Terisa de morgan; 01-14-2015 at 04:35 PM. Reason: typo |
![]() |
![]() |
![]() |
#1183 |
Generally Awesome Person
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
There are some string changes, for anyone interested in updating translations: https://translations.launchpad.net/c...o-driver/trunk
New version (minus translations, obviously) with the CSS file tweaked attached here. Last edited by jgoguen; 01-14-2015 at 09:11 PM. |
![]() |
![]() |
![]() |
#1184 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
I think using Kobo's style-hacks.css is a bad idea, as as it will change the book's existing styles for no reason, and if someone wants the styles changed in that way then they can always add it to their own kobo_extra.css. The div#book-inner * {margin-top: 0; margin-bottom:0;} rule sets the margin for everything below div#book-inner, but doesn't affect the margin of div#book-inner itself. I think this is the exact opposite of what is desired.
The only rules that might be useful to include in all books might be those which ensure that the extra divs added by the driver don't themselves cause changes to the.book. An example of how the presence of those divs could change the book is if the book's stylesheet contained a div {margin-left: 1em;} rule. In the original book that would add a 1em left margin to anything enclosed by a div, but in the converted kepub everything is enclosed by two extra divs and so the converted book would have an extra 2em left margin throughout. To avoid this I would add a rule similar to the following: Code:
div#book-columns, div#book-inner { margin: 0 0 0 0 !important; padding: 0 0 0 0 !important; } Then to fix the full-screen cut off bug, the following could be added to the user's kobo_extra.css or to the built-in stylesheet via a firmware patch: Code:
div#book-columns {padding: 0.2em 0.2em 0.2em 0.2em !important;} Edit: I might be looking at this issue from a different perspective that the others here, as I don't read sideloaded kepubs (I prefer the epub reader), but I see the reason for the driver adding the book-columns and book-inner divs is because there doesn't seem to be any other way to add them automatically with existing methods, while any css in the stylesheet can be added using the existing kobo_extra.css method. Edit2: Also it would not be a good idea to break anything that is currently working, as at some point Kobo are likely to fix the full-screen cut off bug and make full-screen mode an official feature, and then the bug fix that depends on the book-columns/book-inner divs will no longer be needed. Last edited by GeoffR; 01-15-2015 at 01:26 AM. Reason: Also it would not be a good idea to break anything ... |
![]() |
![]() |
![]() |
#1185 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@GeoffR: Just to point out that it's margin-top/margin-bottom and not left/right that's used in Kobo's stylehacks CSS
![]() (Apart form that, nothing more to add, not my area of expertise, I'm doing my best impression of a sponge and soaking up knowledge in the background, carry on ![]() That does explain why I thought the formatting looked wonky in terms of top/bottom margins in what I'm currently reading (unpadded scene breaks, for instance) ;p. Last edited by NiLuJe; 01-14-2015 at 10:03 PM. |
![]() |
![]() |
![]() |
Tags |
error, kobo aura one |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo Device Driver Update | davidfor | Devices | 284 | 05-24-2019 05:24 PM |
[Device Plugin] Kindle 2, 3, 4, Touch Device Interface MBP Update Mod | cryzed | Plugins | 7 | 10-28-2012 04:58 PM |
[Device Interface Plugin] Update for Nook Color Driver | jmricker | Plugins | 0 | 10-22-2011 10:11 AM |
Touch Kobo Touch Extended 2 Year Warranty - Is it worth the $34.99? | EverC | Kobo Reader | 11 | 08-31-2011 11:47 PM |
Touch Kobo Touch Extended Warranty Program | SensualPoet | Kobo Reader | 1 | 07-17-2011 04:08 AM |