Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Consistent way to set CSS for EPUB cover #98

Open
gregoriopellegrino opened this issue Mar 25, 2020 · 6 comments
Open

Consistent way to set CSS for EPUB cover #98

gregoriopellegrino opened this issue Mar 25, 2020 · 6 comments

Comments

@gregoriopellegrino
Copy link
Collaborator

I think we need a consistent way to set CSS for EPUB cover.

In some reading systems cover images are splitting in multiple virtual pages, e.g.:

Schermata 2020-03-25 alle 15 04 39

Schermata 2020-03-25 alle 15 04 47

@llemeurfr
Copy link
Collaborator

I started discussing this with Jiminy Panoz, the author of the Blitz framework.
Notes:

  • this is a general issue for images which must be displayed full-page in a reflowable resource.
  • resolving that issue in EPUB files for all kinds of reading apps is reaallly cumbersome (see this Blitz issue for a proposed solution).
  • a good solution would be IMO to propose a fairly simple best practice which works for most reading apps, especially those supporting EPUB 2 (vs EPUB 2); e.g. based on object-fit. And files issues for the reading apps which don't behave correctly when this best practice is applied.

@gregoriopellegrino
Copy link
Collaborator Author

What about using a declarative solution based on dpub ARIA (https://www.w3.org/TR/dpub-aria-1.0/)?

In this case role="doc-cover"

@clapierre
Copy link
Collaborator

I like this approach with using doc-cover and then shouldn't cause issues where an image was meant to cross two page spreads, although not sure if that is one of the use-cases we are trying not to interfere with.

@dauwhe
Copy link
Contributor

dauwhe commented Mar 25, 2020

I would much prefer that we document best practices rather than asking reading systems to perform special rendering based on markup.

The original images illustrate a massive bug. Images don't fragment, period, no matter what CSS is applied to them.

Some content is not fragmentable, for example many types of replaced elements [CSS2] (such as images or video), scrollable elements, or a single line of text content. Such content is considered monolithic: it contains no possible break points. Any forced breaks within such boxes therefore cannot split the box, and must therefore also be ignored by the box’s own fragmentation context.

@llemeurfr
Copy link
Collaborator

Generally speaking, dpub ARIA is about accessibility only; this is not a generic way to add generic semantic tagging to EPUB.
More, a descriptive tagging won't help reading apps which rely on webviews.

@gregoriopellegrino
Copy link
Collaborator Author

Yeah, I realized now that using dpub ARIA wouldn't be really "webby".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants