Unfortunately not. According to the HTML spec, <hgroup> children must be
<p>, therefore we must use <p> for chapter titles.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup#technical_summary
KOReader should therefore not apply `!important` alignment to `hgroup >
p` as any <p> that is a child of <hgroup> is defined as heading content.
The colophon is paragraph text, just formatted specially. Therefore <p>
is semantically correct.
On 12/11/24 12:46 PM, Glenn Willey wrote:
> I recently switched over to KOReader as my epub reading app of choice
> and noticed a weird formatting issue when using its "left align most
> text" option (rather than keeping text justified) in Standard Ebook's
> books. Chapter titles (besides the numerals) as well as the Colophon in
> each book end up getting aligned to the left, which is unintended
> behavior. I've attached 2 screenshots from The Case of Charles Dexter
> Ward epub (link
> <
https://standardebooks.org/ebooks/h-p-lovecraft/the-case-of-charles-dexter-ward>) showing this behavior.
>
> I talked the issue over with some KOReader maintainers and it looks like
> this is happening because the default "left align most text" option
> KOReader uses is based on this CSS: *body, p, li { text-align: left !
> important; }*
>
> Apparently, it doesn't like that in Standard Ebook's books the Chapter
> titles and Colophon are contained within paragraph blocks (*p*).
> Potentially, is this something that could be changed so that text
> aligned to the left would display properly in KOReader and other apps
> that handle left text alignment this way? Please go simple on me in your
> explanations, I don't have a background in CSS/HTML and troubleshooting
> this cause of this has kind of been a crash course experience for me! 😅
>
> In the meantime, it looks like I can force the text to display as
> intended by using the following custom CSS in KOReader (which removes
> the "p"): *body, li { text-align: left ! important; }*
>
> --
> You received this message because you are subscribed to the Google
> Groups "Standard Ebooks" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
standardebook...@googlegroups.com
> <mailto:
standardebook...@googlegroups.com>.
> To view this discussion visit
>
https://groups.google.com/d/msgid/standardebooks/e7609506-b324-458a-b80e-3a6350501076n%40googlegroups.com <
https://groups.google.com/d/msgid/standardebooks/e7609506-b324-458a-b80e-3a6350501076n%40googlegroups.com?utm_medium=email&utm_source=footer>.