readium / readium-css

🌈 A set of reference stylesheets for EPUB Reading Systems, starting with Readium Mobile
https://readium.org/readium-css/
BSD 3-Clause "New" or "Revised" License
90 stars 20 forks source link

Readium CSS snapshots #11

Closed JayPanoz closed 5 years ago

JayPanoz commented 6 years ago

This issue is meant for tracking progress.

The roadmap can be found in the Wiki.

August 21, 2017

We’ll publish the Readium CSS prototype on the master branch this week, with basic documentation so that implementers can take a look, review, test and report issues if needed.

A lot of testing has happened this last week, with few minor issues to report, and quite good results in any browser tested (Chrome, Safari, Firefox, Edge).

Proto features

Font size being the more complex issue to manage, check issue #8 as it is UX-related.

Ahead of schedule

The good news is that we’re way ahead of schedule for the following:

Extras

We can reliably offer extra user settings for images in night mode:

Known issues

JayPanoz commented 6 years ago

November 22, 2017

We can’t release the alpha version at the moment because we don’t manage vertical writing yet. This will be implemented ASAP, especially as we’ll get some help and feedback from the Japanese APL. Please be assured this is our top priority.

An important note: we moved our Android target to 5.0.

Alpha Version progress

What we’ve got so far:

Docs

Moreover:

danielweck commented 6 years ago

Congratulations, and thank you:) Just to be clear: support for RTL page-progression-direction in horizontal writing mode (e.g. Arabic, Hebrew) has not been formally tested yet, right? I managed to get it working in the Electron (Chromium) / NodeJS / TypeScript app but I had to override the "text align" parameter (left, center, justify, right) to ensure the correct application of @dir=rtl HTML attribute (or CSS direction property) for right-aligned text. Of course the JavaScript -side handling of CSS column offsets (and more importantly: the scroll offset -based overflow or coordinate-based viewport wrapper that pans pages across the horizontal axis) uses mirror calculations for the RTL case ; as expected ; and that's something we might want to document in ReadiumCSS in order to showcase different methods to fully enable the pagination of reflowable documents. I will produce some documentation for the Electron navigator as soon as it is stable (I have not yet tested edge cases including nested CSS boxes with mixes of static/relative/absolute positioning, which typically affect scroll offset calculations).

JayPanoz commented 6 years ago

support for RTL page-progression-direction in horizontal writing mode (e.g. Arabic, Hebrew) has not been formally tested yet, right?

I can confirm it has not been tested yet, since testing and feedback has been tightly coupled to the iOS test app for most of proto/alpha, and it didn't have RTL support at that point. The webpub-viewer I’ve been using was then diverging too much from this practical implementation so it was a little bit difficult to manage it this way.

For the text-align parameter, you might want to try start if you want something cleaner (I added that to the docs yesterday, but I can’t recommend it formally because of Trident/EdgeHTML, which doesn't support it).

To sum things up, the start value will be left in LTR and right in RTL. And, consequently, end will be right in LTR and left in RTL.

It is part of the logical properties and values which will make it a lot easier to manage RTL and writing-modes in the middle term – webkit/blink/gecko already use those props and values in their default stylesheets for example, but they’re non-standard.

the scroll offset -based overflow or coordinate-based viewport wrapper that pans pages across the horizontal axis) uses mirror calculations for the RTL case ; as expected ; and that's something we might want to document in ReadiumCSS in order to showcase different methods to fully enable the pagination of reflowable documents.

Well noted. There’s indeed still a lot to document on that front (relationships between Readium CSS and the more global Reading System in which it will be used) but that was planned.

JayPanoz commented 6 years ago

So yeah sorry, I had to create an “alpha” branch to deal with the release of this version, given the architectural changes, and all the doc-breaking changes – so it absolutely requires docs to be updated before the release.

JayPanoz commented 6 years ago

And to clarify, there is no breaking change at the CSS level, the stylesheets you’ve been using will be almost the same as the stylesheets the alpha will ship (with a few minor improvements in the form of safeguards).

JayPanoz commented 6 years ago

So the alpha version is almost ready.

In addition to the roadmap list items, it ships with:

Warning: the iOS-implem has been deprecated (and removed) as we didn’t need it anymore – dist stylesheets are now doing the job the iOS-implem has been doing so far.

Alpha will be version 0.0.8.

Also, as regards i18n, you’ll find ReadiumCSS-before.css, ReadiumCSS-default.css, and ReadiumCSS-after.css in subfolders.

Question to implementers: does that help you? Or should we suffix those files with -rtl, -cjk-horizontal, and -cjk-vertical?

Personally, I don’t necessarily like having files by the same names but it might ease injection a little bit – the folder’s path being the only difference?

Any question, feel free to ask.

danielweck commented 6 years ago

Thanks, I will start looking inside https://github.com/readium/readium-css/tree/alpha/css/dist to figure-out how to update the R2 Electron navigator.

danielweck commented 6 years ago

Right now I'm using the ReadiumCSS files as-is (no removal of Media Queries, etc.). The rendered reflowable documents look okay, I will figure-out how to switch vertical, RTL, etc. later (especially as this will probably require changes in the Electron/JS pagination code).

JayPanoz commented 6 years ago

So yeah I can confirm the most reasonable path seems to be:

  1. handling Indic and other non-Latin-and-non-CJK scripts (they’re built-in but can serve for lang logic in OPF);
  2. handling CJK horizontal, mainly Chinese and Korean (page-progression-direction check in OPF + loading specific stylesheets);
  3. handling RTL scripts (navigator → RTL progression);
  4. handling CJK vertical (require lots of changes but it’s the same logic as R1).

And of course please feel free if something is unclear or poorly-worded in docs. :)

JayPanoz commented 6 years ago

Alpha has just been merged into develop.

It will be merged into master in the upcoming weeks.

JayPanoz commented 6 years ago

Alpha has been merged into master.

We’ll merge develop updates much regularly from now on.

JayPanoz commented 6 years ago

It’s highly likely we won’t need this issue any longer since we’ll make smaller merges from now on (and not the huge ones we did for the proto and alpha version) so I’ll close it in a few days if nobody disagrees.