-
Notifications
You must be signed in to change notification settings - Fork 19
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
ADE drops complete CSS stylesheets with media queries for EPUB2 #212
Comments
Thanks, this is helpful. Does ADE do anything useful for any of the media queries? in other words, if we change all media queries to just all, would we be losing anything? doe it obey the orientation media query, because that could be useful. |
It doesn't look like it does anything useful with the queries. Which probably makes sense as media features are not part of CSS 2, which is what is used for EPUB2 if I understand correctly. It seems it already considers the queries it doesn't break on as Changing all queries to
If the media query would be rewritten to Edit: this might not be the best example as the |
@jderuiter does ADE ignore ALL CSS when you have something like (min-width: 500px) in the media query? of just the CSS in the style element where it occurs? |
It does not seem to ignore all CSS. It looks like it ignores everything in the same CSS file. I think every style element gets its own CSS file, so in that case it would just ignore all the CSS in the same style element. |
Thanks! I've passed this tip on to the PPers. I think we won't need to do much in Ebookmaker. |
As long as people know about this behaviour and how to handle this it should be fine. Maybe a warning might still be helpful? When users are unaware of this it could completely screw up the EPUB2 version. |
we could remove size based queries for EPUB2, but in the next major version |
Continuing this discussion here.
It looks like ADE drops complete CSS stylesheets when they contain particular media queries in EPUB2 files. I tested ADE 4.5 with several queries in the attached file (epub2-tests.zip). So far my observation is that when the query contains a feature with a numeric value it seems to break and the complete stylesheet gets ignored.
I could work around it by putting the media query in its own style tags. Would it be an option to have ebookmaker take care of this automatically, e.g. by filtering out the problematic media features? The media features are not part of CSS2 and the validator sees them as vendor extensions.
The text was updated successfully, but these errors were encountered: