-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Allow multiple stylesheets to be specified with --epub-stylesheet #847
Comments
We do currently need to insert multiple stylesheets in order to support media queries. Example of the second stylesheet:
So that suggests an even further enhancement, to support the media query. iBooks supports this well. It may be possible to do the media query within the main stylesheet.css– I'll try that. Not quite as nice though. |
All that said..... It could be that the most flexible solution is to allow rewriting the |
Confirmed that multiple separate stylesheets are not strictly necessary to accomplish a media query in iBooks. |
Multiple stylesheets is indeed required for media queries that work in modern ereaders such as iBooks AND remaining compatible with less advanced but very widespread ereaders based on Adobe's RMSDK (99% of e-ink EPUB ereaders I’d say), due to a nasty bug that the latter has of ignoring any whole stylesheet that contains a media query. A common solution to overcome that is to provide a baseline CSS stylesheet that all ereaders will support, and then a separate additional one with media queries RMSDK will ignore but non RMSDK-based ones will not. That way RMSDK-based ereaders will still apply basic styles even if they ignore the extra ones based on media queries. Adobe Digital Editions for Mac and Windows are also RMSDK-based, so this bug and its "solution" can be easily tested on a desktop computer too. If multiple stylesheets support is to be added, please allow doing so in the EPUB metadata block of a pandoc markdown file in addition to the |
+1 |
Closing in favor of #3472 |
* Removed writerEpubStylesheet in WriterOptions. * Removed `--epub-stylesheet` option. * Allow `--css` to be used with epub. * Allow multiple stylesheets to be used. * Stylesheets will be taken both from `--css` and from the `stylesheet` metadata field (which can contain either a file path or a list of them). Closes #3472, #847.
I was hoping to put multiple stylesheets in my ePub file so that I can add in an ePub-only stylesheet to pair with a webpage-only stylesheet, but as it turns out, --epub-stylesheet doesn't quite work like --css. I tried the following, and italics, but not green text:
Evidently the only thing that goes into the ePub's stylesheet.css is the final file specified. Could this be fixed to allow multiple invocations like --css?
The text was updated successfully, but these errors were encountered: