Quote:
Originally Posted by Hitch
Have you had any success with the !important modifier vis-a-vis the Previewer, at Kobo's website?
|
I haven't tried it for that issue. I'm just giving general comments based on the CSS spec.
Again, though, be aware that it isn't necessarily sufficient to just add !important. You also have to add additional elements and/or classes to the rule until you've raised its specificity above the built-in rule's specificity. That's the bit that many attempts at overriding evil stylesheets often miss.
Something else that can often bite you (particularly in iBooks' built-in stylesheets) is the universal selector (*), because it means that for some styles, you might need to do things like:
Code:
p.whatever {style_rule_here !important; }
p.whatever * {style_rule_here !important; }
depending on the style rule and whether it needs to cascade to elements inside a tag. I have no idea if Kobo is doing anything similar.
The one that got me was that Kobo reader (at least I think it was Kobo) had a bug where if you reduced the left an right margins to zero, you'd get parts of one page on the previous page. I think I filed a bug about that, and they fixed it in a subsequent release. That said, I might be remembering some other reader. They all run together after a while.