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 01-14-2015, 03:08 AM   #1171
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
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.
Terisa de morgan is offline   Reply With Quote
Old 01-14-2015, 04:28 AM   #1172
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
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;
Terisa de morgan is offline   Reply With Quote
Old 01-14-2015, 04:51 AM   #1173
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
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;
}
should not have the * selector:
Code:
div#book-inner {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
(if the rule is needed at all? In fact, I don't see why style-hacks.css is needed at all?)

Last edited by GeoffR; 01-14-2015 at 04:53 AM. Reason: why is style-hacks.css needed at all?
GeoffR is offline   Reply With Quote
Old 01-14-2015, 05:00 AM   #1174
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
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.
Terisa de morgan is offline   Reply With Quote
Old 01-14-2015, 05:16 AM   #1175
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
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.
GeoffR is offline   Reply With Quote
Old 01-14-2015, 05:20 AM   #1176
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
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.
Terisa de morgan is offline   Reply With Quote
Old 01-14-2015, 05:47 AM   #1177
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
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;
}
GeoffR is offline   Reply With Quote
Old 01-14-2015, 05:52 AM   #1178
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
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
Quote:
Originally Posted by GeoffR View Post
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;
}
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.
Terisa de morgan is offline   Reply With Quote
Old 01-14-2015, 08:56 AM   #1179
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
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.
jgoguen is offline   Reply With Quote
Old 01-14-2015, 09:39 AM   #1180
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
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 .
NiLuJe is offline   Reply With Quote
Old 01-14-2015, 11:14 AM   #1181
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
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 The other things I don't know...
Terisa de morgan is offline   Reply With Quote
Old 01-14-2015, 04:35 PM   #1182
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
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 ;
}
(I've removed '*' and !important only).

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
Terisa de morgan is offline   Reply With Quote
Old 01-14-2015, 05:28 PM   #1183
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
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.
Attached Files
File Type: zip KoboTouchExtended.zip (29.2 KB, 213 views)

Last edited by jgoguen; 01-14-2015 at 09:11 PM.
jgoguen is offline   Reply With Quote
Old 01-14-2015, 08:35 PM   #1184
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
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;
}
(Some other properties might need to be added to this, such as font-size: 1.0em?) Note there is no * selector following the div selectors, so this rule should only affect the extra divs themselves, and not anything below, and just ensure that margin and padding styles from the original book do not get attached to the extra divs added by the driver.

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 ...
GeoffR is offline   Reply With Quote
Old 01-14-2015, 09:57 PM   #1185
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
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.
NiLuJe is offline   Reply With Quote
Reply

Tags
error, kobo aura one


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:18 AM.


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