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

Auto dark mode extension #21

Open
mvanrongen opened this issue Nov 22, 2024 · 0 comments
Open

Auto dark mode extension #21

mvanrongen opened this issue Nov 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mvanrongen
Copy link

mvanrongen commented Nov 22, 2024

I've added an auto dark mode extension to my in-progress coding for research materials.

Works quite well out-of-the-box. Two changes in _quarto.yml, an added filter and an added theme:

filters:
  - courseformat
  - auto-dark

format:
  courseformat-html:
    theme: flatly

edit:

Needs a tweak in the extension itself, because otherwise the background colour of the sourceCode blocks is also black. This makes it hard to see the delineation of the code chunks. In the auto-dark-mode.css file, add:

  /* Re-enable source code block backgrounds. */
  div.sourceCode {
    filter: invert(10%);
  }
@mvanrongen mvanrongen added the enhancement New feature or request label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant