latex-css/prism
Daniele Sluijters 5ab03c6779
Support for dark mode (#48)
* Turn all colors into variables

This turns each color into a $elem(-$pseudo)-$attribute named variable
on the :root element and replaces their usage by calling the var()
function instead.

* Add dark mode colors

This overrides the colors when prefers-color-scheme is set to dark,
indicating the user has configured their OS or user-agent to prefer
a light text on dark background instead. It includes a way to manually
toggle dark mode by using a data attribute on the html element.

The syntax highlight colors are also updated to support dark mode.

* feat: improve dark mode implementation and docs

- Dark mode based on classes, with three options
  - light mode (default, no changes needed)
  - auto dark mode (based on prefers-color-scheme; latex-dark-auto class on body)
  - dark mode (latex-dark class on body)
- Removed the mention of dark mode from the lead and moved it to the getting started section
- Moved the dark mode section up, since it is a pretty important feature imo.
- Added a dark mode toggle button for demo
- Added a CSS filter to the proof symbol so that it shows up as dark grey instead of white
- Built the project to generate the minified css file

Co-authored-by: Vincent Dörig <dvincdt@gmail.com>
2022-10-10 14:52:53 +02:00
..
prism.css Support for dark mode (#48) 2022-10-10 14:52:53 +02:00
prism.js feat: add minted syntax highlighting using PrismJS (#33) 2020-12-04 17:40:16 +01:00