Closed 4e554c4c closed 1 year ago
there seems to be an issue switching from a defined colorscheme to system colorscheme (e.g. "dark theme" -> "system") then the theme does not update until you refresh. not sure why this is happening, since it doesn't happen with doc-gen.
ok i think i took care of all of the edge cases.
Thank's a lot, it seems to work for me too. Unfortunately the matlhib doc builds right now are broken due to some weird meta programming issue so this won't be deployed too son.
This commit adds a dark mode to doc-gen4. It takes much inspiration from leanprover-community/doc-gen#160. Unlike the dark theme in doc-gen, this will work with or without javascript. If javascript is disabled, the color picker will not work. However, the correct theme will be detected from the browser based on css media queries. If javascript is enabled, the color picker will work and color picker preferences will be remembered.
note: a dark-mode is not added to inked code. This PR only applies to generated documentation.
closes #117