kobolabs / epub-spec

Details on the elements of the ePub spec that Kobo supports, as well as other information on the Kobo reading platforms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"text-align:center;" ignored when user chooses justifed text

Eggheadbooks opened this issue · comments

Am testing in my Kobo Touch a book I built. The Touch just updated itself to the latest O/S. In the epub, I have sections to mimic a screenplay:

.speaker
	{margin-left: 20%;
	margin-right: 20%;
	margin-bottom:0;
	font-size:1em;
	text-indent:0;
	text-align:center;
	font-family:"Courier New", Courier, monospace;}

When I tested it, if the default (unjustified) text is left as is, no problem; but if I turn justification on, the margins are still respected, but the text-align:center is ignored and reverts to left aligned. I have tried a workaround by adding text-align:center inline styling, but to no avail. Note that this problem does not occur with headings (h1, etc) but it does occur with all other styles that are all center aligned including my title, subtitle, and author styles; for example:

p.Subtitle
	{margin-right:0em;
	margin-bottom:2em;
	margin-left:0em;
	text-align:center;
	text-indent:0%;
	font-size:1.5em;
	font-weight:bold;
	line-height:120%;}

This did not happen in my previous O/S, so I am assuming this is a bug.

Update: turns out, only h1 and h2 are unaffected: I tried a workaround by restyling my title, subtitle, etc., as h3, h4, and so on; this did not work. Perhaps it was always like this but I don't recall so.

Update: this also affects images that are centered.

@Eggheadbooks can you send the epub or a sample of it to kobo-renderingissues@mail.rakuten.com
We'll take a look. Can you also confirm that you're renaming the file .kepub.epub to trigger the Kobo display engine? If you aren't it will be displayed in RMSDK.

Still a bug.

An additional problem occurs with text-align: right, which is also overruled.

Still a bug.