-
Notifications
You must be signed in to change notification settings - Fork 20
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
Off-the-rack night theme #7
Comments
Please note this is related to personalization: |
For gaiji, we’ll take the Japanese EPUB profile as a reference: http://ebpaj.jp/cmspage/wp/wp-content/uploads/2015/04/ebpaj_epub3guide_ver1.1.3-en-1.zip |
An interesting idea from Wikipedia that we might implement as well, especially as it is one line of CSS: letting the user darken all images in night mode (sorry, screenshot in french) In that case, having another switch for inverting all images could be offered as well, it may be unperfected but for some books, it could solve a lot of issues (headings or table as images, B&W illustrations, etc.). |
I think it's a safe approach. In the vast majority of cases, images should not be inverted.
An author-defined mechanism might be interesting. The right venue to ask for feedback/interest could be WICG. Another approach, as you state in you last comment, is to have a user preference. But "coloring" and "inverting" should be kept separated IMO. People could want the image to be darkened, or be applied a sepia filter, but still don't want to be inverted in a full night mode. |
Sorry if it was unclear, darken and invert would be 2 different switches, obviously (this is how I implemented them yesterday BTW). For the record:
As for sepia, we currently apply a Thanks for the feedback! |
As an update, I did a quick round of testing today and night mode is quite alright. Darken and invert options definitely help, they can improve comfort pretty dramatically in some illustrated-heavy publications. Haven’t had the time to check everything yet but that’s a good start, we don’t have any major issue to deal with. |
After further testing, we’d probably better create some kind of CSS The assumption is:
Benefits for implementers:
On the other hand, we should probably start discussing a fallback mechanism for browsers which don’t support CSS variables. Although we’re not impacted with the reference implementations (iOS + Readium Desktop), some implementers will have to deal with IE11 and Edge 14 (web app). I can open a dedicated issue now but feedback from implementers will come later, obviously (it needs practical implementations to see which options are the best ones). |
Closing this issue since we’re past design and it should be now managed on an issue-by-issue basis. As an update, handling of OSs’ invert setting (a11y) has been improved a little bit (must still do extended testing). Last comment I posted should be a (new) specific issue as well, since it is not about the night mode per se but re-usability of the sepia and night mode modules. |
We’re very likely to ship with a “standard” theme for night mode. There are a couple of issues we must deal with, especially as it is a11y-related. In other words, we can probably make a few compromises but authors will have to make the most.
In the spirit of issue #5, I’d like to kickstart the conversation way ahead of time.
The current situation
The sad truth is that nobody knows how to deal with that.
font-family
andfont-size
by the way)Major issues
#FCFCFC
on#121212
, etc.epub:type
title page + image) though.linear-gradient
+-webkit-text-fill-color
for text). There’s also text on background images which we’d better not override if we don’t overridebackground-image
(JS territory).-webkit-text-fill-color
hack might be used to enforce links’ or headings’ color.p > img
). iBooks had to create a metadata for that.Design
At first sight:
background-color
andborder-color
but notbackground-image
;color
but not-webkit-text-fill-color
;currentColor
forfill
(can check some SVG attributes and the colors but it will result in insane CSS selectors);Possible issues this will create
color
and stuff (but it’s an accessibility issue);The text was updated successfully, but these errors were encountered: