View Single Post
Old 09-28-2018, 04:08 AM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
text-align: initial; -- ??

I was restyling an epub3 file and wanted to change the text alignment.

So just did
p{ text-align:justify;}

Viewing the epub, it's justified.

Converted to AZW3 using Kindlegen, the text is left justified on my PW3.
Cannot be changed.
Hair-pulling ensues.

I used the Calibre viewer on the AZW3 and its inspector shows me that
text-align: initial;
is having an effect.
I find that at the end of the css, in media queries:

Code:
@media amzn-kf8 {
    body {
    	margin-left: 0.00em;
    	margin-right: 0.00em;
    	text-indent: 0.00em;
    }
    p { /*new  requirements for device adjustable line spacing*/
        text-align: initial;
    }
So I can just delete this.
But why is it here?
The comment states it's necessary for linespacing, but I can adjust linespacing in Kindle regardless on any azw I have.

What does "initial" mean anyway?
Where is the "initial justification" defined? Is it different for each device, reader?

Is this code actually useful in some situation? Seems to cause more trouble than it could solve.

Last edited by AlanHK; 09-28-2018 at 04:10 AM.
AlanHK is offline   Reply With Quote