Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for alternate style tags #71

Open
danielweck opened this issue Jul 28, 2014 · 7 comments
Open

Support for alternate style tags #71

danielweck opened this issue Jul 28, 2014 · 7 comments

Comments

@danielweck
Copy link
Member

danielweck commented Jul 28, 2014

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

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

@danielweck
Copy link
Member Author

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 )

@mickael-menu-mantano
Copy link

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:
#71 (comment)

@danielweck
Copy link
Member Author

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!

@mickael-menu-mantano
Copy link

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:
#71 (comment)

@danielweck
Copy link
Member Author

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
Copy link
Member Author

danielweck commented Jul 13, 2016

Mantano / Bookari screenshot:
img_5882

@danielweck
Copy link
Member Author

...and my comment regarding the link@class default standardized vocabulary:
w3c/epub-specs#668 (comment)

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

No branches or pull requests

3 participants