readium-shared-js icon indicating copy to clipboard operation
readium-shared-js copied to clipboard

Support for alternate style tags

Open danielweck opened this issue 11 years ago • 7 comments

http://www.idpf.org/epub/altss-tags/

http://www.idpf.org/epub/31/spec/epub-contentdocs.html#sec-html-alternate-style-tags

danielweck avatar Jul 28 '14 22:07 danielweck

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 )

danielweck avatar Sep 18 '14 11:09 danielweck

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

mickael-menu-mantano avatar Sep 18 '14 12:09 mickael-menu-mantano

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!

danielweck avatar Sep 18 '14 14:09 danielweck

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

mickael-menu-mantano avatar Sep 18 '14 14:09 mickael-menu-mantano

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.

danielweck avatar Sep 18 '14 15:09 danielweck

Mantano / Bookari screenshot: img_5882

danielweck avatar Jul 13 '16 15:07 danielweck

...and my comment regarding the link@class default standardized vocabulary: https://github.com/IDPF/epub-revision/issues/668#issuecomment-232396601

danielweck avatar Jul 13 '16 15:07 danielweck