View Single Post
Old 09-29-2016, 01:07 PM   #3
nabsltd
Fanatic
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 517
Karma: 8500000
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
Quote:
Originally Posted by theducks View Post
Do you understand how CSS interact?

The first word is Cascade. That means the LAST definition read prevails.
Yes, I do, and I use the feature a lot by not listing every CSS property on every selector. See the attached for an example.

Note that there is no explicit declaration of "margin-top" on the paragraph, which is good coding practice for CSS, as it allows user stylesheets to override it if they wish. In the reader, the "margin-top: 0" in my user stylesheet sets that up the way I like it. Other users can choose differently, and end up with the book looking the way they like it. It also makes it easier for readers that support a "line spacing" or "paragraph spacing" option, so they can use a "default" stylesheet for these kinds of options, allowing cascade: reader default->user stylesheet->document stylesheet(s).

On the other hand, in the editor, not only does it display with a top margin that is non-zero (obviously from some built-in user stylesheet that I can't edit), but the "Computed final style" doesn't show that non-zero top margin anywhere.

The problem in this case is actually with the fact that -webkit-margin-before doesn't have a default of zero in the editor's built-in stylesheet.

Quote:
You can always import (add files) ANY valid file type
Then you link Stylesheets to the (x)HTML (the link tool allows selection of which. those not selected are unlinked)
Again, doing this means I would need to undo it before I save, so I get the correct defaults on each reader. Also, this particular change would be disastrous on the Onyx Boox M92 if I forget to undo, as the version of Cool Reader on it ignores all but the first link element on a page.
Attached Thumbnails
Click image for larger version

Name:	InReader.jpg
Views:	243
Size:	113.6 KB
ID:	152024   Click image for larger version

Name:	InEditor.jpg
Views:	243
Size:	83.7 KB
ID:	152025  
nabsltd is offline   Reply With Quote