Support for alternate style tags
http://www.idpf.org/epub/altss-tags/
http://www.idpf.org/epub/31/spec/epub-contentdocs.html#sec-html-alternate-style-tags
Just as a point of reference: http://d.alistapart.com/alternate/styleswitcher.js (note that this simple JS utility does not support "tagging" via the class attribute, as per the aforementioned IDPF specification for "Alternate Style Tags" http://www.idpf.org/epub/altss-tags )
Hello Daniel,
We support alternative stylesheets in Mantano Reader and we’d be happy to share it with Readium. I’m waiting for the footnotes (plugins) branch to be merged into develop to plug the alternative stylesheets system in. Mickaël Menu R&D Engineer
2 rue du Helder - 75009 Paris, France Tel.: +33 1 42 47 05 61
[email protected] www.mantano.com store.mantano.com cloud.mantano.com
On Thu, Sep 18, 2014 at 1:50 PM, danielweck [email protected] wrote:
Just as a point of reference: http://d.alistapart.com/alternate/styleswitcher.js
(note that this simple JS utility does not support "tagging" via the class attribute, as per the aforementioned IDPF specification for "Alternate Style Tags" http://www.idpf.org/epub/altss-tags )
Reply to this email directly or view it on GitHub: https://github.com/readium/readium-shared-js/issues/71#issuecomment-56027768
Hello Mickael, your code contribution would be great! The plugin "architecture" has deeper ramifications that need to be discussed with other implementors before we merge your proposed design into the develop branch. Any chance you could share your "alternate stylesheets" implementation irrespective of the event framework which serves as a plugin bootstrapper? (for example, can you share the core routines that bind the "disabled" state of link/rel/href CSS declarations to user preferences / reading system settings? Thanks!
I agree with you, this needs to be discussed and enhanced. My proposition is very light and it is merely to begin a plugins architecture.
Here’s our implementation:
https://gist.github.com/mmenu-mantano/ba03aeb8a7672ecba03c
But I think it would be better to wait a proper plugin architecture before adding it to Readium.
In this implementation, the selected stylesheets is reapplied when changing the spine item, if it is available in the new spine item. Mickaël Menu R&D Engineer
2 rue du Helder - 75009 Paris, France Tel.: +33 1 42 47 05 61
[email protected] www.mantano.com store.mantano.com cloud.mantano.com
On Thu, Sep 18, 2014 at 4:37 PM, danielweck [email protected] wrote:
Hello Mickael, your code contribution would be great! The plugin "architecture" has deeper ramifications that need to be discussed with other implementors before we merge your proposed design into the develop branch. Any chance you could share your "alternate stylesheets" implementation irrespective of the event framework which serves as a plugin bootstrapper? (for example, can you share the core routines that bind the "disabled" state of link/rel/href CSS declarations to user preferences / reading system settings? Thanks!
Reply to this email directly or view it on GitHub: https://github.com/readium/readium-shared-js/issues/71#issuecomment-56047384
Thank you @mmenu-mantano I think we should follow the IDPF specification (linked above) and implement support for alternate style tags ("class" attribute), but otherwise your approach is conceptually similar to alistapart's styleswitcher.js (linked above), and as far as I know it works well across multiple browsers and platforms.
Mantano / Bookari screenshot:
...and my comment regarding the link@class default standardized vocabulary: https://github.com/IDPF/epub-revision/issues/668#issuecomment-232396601