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

Make dark mode work well #2113

Open
davidfarmer opened this issue Jan 26, 2024 · 5 comments
Open

Make dark mode work well #2113

davidfarmer opened this issue Jan 26, 2024 · 5 comments

Comments

@davidfarmer
Copy link
Contributor

Add known issues with using the browser's built-in dark mode.

Please include a link to the HTML and which browser had an issue.

@oscarlevin
Copy link
Member

Using Chrome's dark mode doesn't do anything for my book at all. There is a "Dark" extension that forces sites to use a dark mode, and this does invert the colors. However, it doesn't invert the colors of SVG files, so they look like black dots on very dark gray. https://discrete.openmathbooks.org/dmoi3/sec_gt-intro.html

@ascholerChemeketa
Copy link
Contributor

This PR is the one that turns on the existing dark css rules when dark mode is set by the OS/browser.

#2114

@rbeezer
Copy link
Collaborator

rbeezer commented Jan 27, 2024

Sample article, with #2114 applied, is at https://pretextbook.org/beta/html-dark-2024-01-26

@davidfarmer
Copy link
Contributor Author

In the sample article:
https://pretextbook.org/beta/html-dark-2024-01-26/section-interesting-corollary.html

Checkpoint 4.4 knowl has white background (needs to be dark, not necessarily the
same as the page background).

Same for Checkpoint 4.7 (also need to address the H/A/S in that knowl)

Solution in Exploration 4.2 knowl looks fine (but maybe use a different dark background?)

Aside near Checkpoint 4.10 needs dark background (but definitely different than the
main dark background).

Sage cell in Technology 4.12 has stark white background. Make less white, or should
Sage cells be light text on dark background?

4.2.6 Solutions for This Subsection:
white border on left should be less light

@rbeezer
Copy link
Collaborator

rbeezer commented Jan 27, 2024

Lots to chew on in the "Graphics" section. LaTeX-images (tikz) are likely based on an old conversion from PDF to SVG, it is possible they might behave differently if regenerated.

https://pretextbook.org/beta/html-dark-2024-01-26/section-graphics.html

Asymptote images all seem to have a solid-white background. But transparent images elsewhere don't seem to work so well, things like axes are being washed out. Not clear to me what we want here, and if we will need to advise authors on constructing their images.

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

No branches or pull requests

4 participants