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-15-2015, 12:26 AM   #1186
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,638
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 jgoguen View Post
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.
I've updated the Spanish translation although I'm not sure of one of them, so I've marked it for review.
Terisa de morgan is offline   Reply With Quote
Old 01-15-2015, 01:30 AM   #1187
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
Quote:
Originally Posted by NiLuJe View Post
@GeoffR: Just to point out that it's margin-top/margin-bottom and not left/right that's used in Kobo's stylehacks CSS .
Thanks, I edited my post to change that.

This brings up the point that for vertical language books, margin-left/right and margin-top/bottom are likely to be interchanged, so the style-hacks.css is likely different for different books. I expect this example was taken from a horizontal language book, and would have very different effects in a vertical language book.
GeoffR is offline   Reply With Quote
Advert
Old 01-15-2015, 02:42 AM   #1188
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: Ooh, right, good point. (Yes, that was from a ltr book ).
NiLuJe is offline   Reply With Quote
Old 01-15-2015, 05:33 PM   #1189
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: One issue with enforcing padding on div-inner from here is that the current synced kepub cut-off patch doesn't use !important, and is thus rendered useless, which is a bit counter-productive, since my original intent was to try to make this play nice with this very patch . [without having to resort to kobo_extra.css]

So I'm currently playing with
Code:
div#book-columns, div#book-inner {
	margin: 0 !important;
}
or even:
Code:
div#book-columns {
	margin: 0 !important;
	padding: 0 !important;
}

div#book-inner {
	margin: 0 !important;
}
(to be extra safe).

EDIT: Or even better, see #1191 instead ;p.

(and not
Code:
div#book-columns, div#book-inner {
	margin: 0 !important;
        padding: 0 !important;
}
)


instead of
Code:
div#book-inner * {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
So far, it looks okay, but I'll throw some more books at it .

Last edited by NiLuJe; 01-15-2015 at 06:12 PM.
NiLuJe is offline   Reply With Quote
Old 01-15-2015, 05:38 PM   #1190
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
The problem with !important is that it stops people from applying their own styles to a book. Which I guess is the publishers trying to impose the same controls they had with print media, but it's a negative user experience when you run into "all my tweaks work except this one that's actually really important for me". You shouldn't need !important anyway, unless something somewhere higher up the priority list is setting the margins or something anywhere else is setting them with !important.
jgoguen is offline   Reply With Quote
Advert
Old 01-15-2015, 05:47 PM   #1191
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
@jgoguen: Agreed. But in this specific instance, if we only strictly apply it to most-likely-unique stuff we're the ones adding, doesn't that alleviate that issue? While still addressing @GeoffR's concern of these new divs inheriting unwanted margin/padding-related properties?

(I'm starting to feel sympathy for people that actually do this kind of stuff for a living ^^).

EDIT: On the other hand, a quick test seems to be inconclusive as to whether !important actually 'helps' (in the sense avoiding inheriting margins), so, either I'm doing something wrong, or I'm still confused about how everything interacts with everything ^^.

EDIT: Scratch that, there was a third wrapping div in my test file, hence my confusion... -_-".

So, take two?:
Code:
div#book-columns {
        margin: 0;
        padding: 0;
}
div#book-inner {
        margin: 0;
}

Last edited by NiLuJe; 01-15-2015 at 09:38 PM.
NiLuJe is offline   Reply With Quote
Old 01-15-2015, 05:56 PM   #1192
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 circumstances where this would be OK (or at least, relatively not so bad), but never depend on no one else ever writing rules that they would reasonably expect to override yours. !important is best avoided where possible.

I did a lot of web development at a previous job, I was one of those people who wrote a lot of HTML and CSS for a living...
jgoguen is offline   Reply With Quote
Old 01-15-2015, 05:56 PM   #1193
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,638
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
If you're going to do this modification and add important, so my margin definitions can be useless, please, make it optional. I've tested the last version and it works well for me. I know nothing about the bug because I have never seen it.

Last edited by Terisa de morgan; 01-15-2015 at 06:00 PM.
Terisa de morgan is offline   Reply With Quote
Old 01-15-2015, 06:12 PM   #1194
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
@jgoguen: Got it . Edited my previous posts .
NiLuJe is offline   Reply With Quote
Old 01-15-2015, 06:27 PM   #1195
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
Here's a CSS reference, with more than you ever wanted to know (and way more than you need for ebooks!) about CSS

https://developer.mozilla.org/en-US/docs/Web/CSS
jgoguen is offline   Reply With Quote
Old 01-15-2015, 08:47 PM   #1196
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
The !important on the properties of the book-columns and book-inner divs is probably not necessary in most cases, except that if there was something like div {margin-left: 1em !important} in the book's stylesheet then that margin would be applied to those added divs too, which would change the book in an unexpected way (since the author has no way to know that the driver is adding extra divs.) However that is probably not very common, so it would be OK to leave it out.

The current firmware patch doesn't use !important when adding padding to these divs because there is currently nothing to override, but I can change it so that the patch uses !important.

The order of priority goes like this as I understand it (lowest to highest priority):
1. device stylesheet
2. book stylesheet
3. book stylesheet !important
4. device stylesheet !important

So without !important the device stylesheet just provides a default which is overriden by the book stylesheet, but if the device stylesheet uses !important then it overrides everything.

Edit: Allowing for the style-hacks.css (I assume this is added at the start of the book's stylesheet?) and kobo_extra.css (added at the end of the book's stylesheet):
1. device stylesheet
2. style-hacks.css
3. book stylesheet
4. kobo_extra.css
5. style-hacks.css !important
6. book stylesheet !important
7. kobo_extra.css !important
8. device stylesheet !important

Last edited by GeoffR; 01-15-2015 at 09:06 PM. Reason: Allowing for ...
GeoffR is offline   Reply With Quote
Old 01-15-2015, 10:13 PM   #1197
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by GeoffR View Post
Edit: Allowing for the style-hacks.css (I assume this is added at the start of the book's stylesheet?) and kobo_extra.css (added at the end of the book's stylesheet):
1. device stylesheet
2. style-hacks.css
3. book stylesheet
4. kobo_extra.css
5. style-hacks.css !important
6. book stylesheet !important
7. kobo_extra.css !important
8. device stylesheet !important
From memory, the style-hacks.css was being added as a file and a link to it added to each HTML file. I'm pretty sure it is added as the last stylesheet. So that should put it after the book stylesheet. Then, depending on when this is added and when the kobo_extra.css is added, the contents of kobo_extra.css might be appended to only the book stylesheet or add to both the book and the style-hacks. I think the latter. That should give:

1. device stylesheet
2. book stylesheet
3. style-hacks.css
4. kobo_extra.css
5. book stylesheet !important
6. style-hacks.css !important
7. kobo_extra.css !important
8. device stylesheet !important
davidfor is offline   Reply With Quote
Old 01-15-2015, 10:20 PM   #1198
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
Yup, right now it's added as the last stylesheet (since I assumed (maybe wrongly) that was roughly equivalent to what happens on kobo's files where that bit of css is inlined at the bottom of the head tag).

IIRC, kobo_extra is a bit more complex, and basically rewrites everything and/or appends itself at the end of *every* stylesheets.


On a sidenote, realized why I was confused by the !important thingy in my quick tests: I'd missed a *third* div wrapping the contents of the body in my test book, which of course threw me since I thought it wasn't there ^^ (serves me right for trying to gain a bit of time by reusing an existing thing without checking it more carefully). Thanks for the detailed explanations & references .

Last edited by NiLuJe; 01-15-2015 at 10:25 PM.
NiLuJe is offline   Reply With Quote
Old 01-17-2015, 04:53 PM   #1199
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
Other than !important being the root of all evil, has anyone tried the plugin update and found issues?
jgoguen is offline   Reply With Quote
Old 01-18-2015, 02:51 AM   #1200
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,638
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I'm still using it and no issues with it till now (the last version without important).
Terisa de morgan 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 09:15 AM.


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