CSS/JS injection
As a follow-up to our discussion during the last call, I created a new document to summarize requirements and start discussing how we could define configuration files and APIs for CSS/JS injection: https://github.com/readium/readium-2/blob/master/other/apis/CSS-JS%20Injection%20API.md
Quick question: do we want to manage writing modes in there?
For instance, loading the vertical-rl styles by default would not necessarily make a lot of sense for a french or german vendor, and although not critical, that could be an easy perf win (less styles to load and parse, etc.). On the opposite, a japanese or chinese vendor might not need a lot of styles for latin-based languages.
So yeah I can confirm we’ll need to manage vertical-rl, maybe even CJK in there.
On a related note, we’ll also probably need something to set attributes on the root element (html) because there are cases for which we’ll need dir, xml:lang, etc. Solving the flickering of undefined variables could probably benefit from this.
And another thing the app’s UI can use to load different fonts’ list in user settings, but also remove/add settings, depending on the main language of the publication.
I guess it could be a good idea discussing localization instead of Readium CSS per se on the next call, because the biggest impacts are quite definitely at the streamer, navigator, APIs and UI level. My gut feeling tells me that prioritizing needs/features will be critical there, and we’d better do it sooner than later or else we might have to redo a lot of stuff at some point, should we end up managing localization on our side.
CC’ing @rkwright since he pointed out localization a few weeks back, and it probably belongs in another issue.
@HadrienGardeur I took your idea and came up with this model: https://github.com/readium/readium-2/blob/master/other/injection.md
To start, I feel like it needs some streamlining.