diff options
| author | 2025-05-30 11:06:08 +0200 | |
|---|---|---|
| committer | 2025-05-30 11:06:08 +0200 | |
| commit | 2c73bb3602ebdc40a58b9790cc7f5785e44ea24c (patch) | |
| tree | 10d80dd2ea9735cda895e9e89bfc9553a42ae4cb /web/source/css/base.css | |
| parent | [feature/frontend] Add four new monospace themes (#4199) (diff) | |
| download | gotosocial-2c73bb3602ebdc40a58b9790cc7f5785e44ea24c.tar.xz | |
[feature/frontend] Respect color scheme preference for highlighted code blocks (#4201)
That's it! It just conditionally imports prism light or prism dark depending on the theme.
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4201
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'web/source/css/base.css')
| -rw-r--r-- | web/source/css/base.css | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web/source/css/base.css b/web/source/css/base.css index c9ff21d74..01b7154ac 100644 --- a/web/source/css/base.css +++ b/web/source/css/base.css @@ -22,7 +22,10 @@ ****************************************/ @import "modern-normalize/modern-normalize.css"; -@import "./_prism.css"; + +/* Default to dark prism, choose light if prefers-color-scheme light */ +@import url("_prism-dark.css"); +@import url("_prism-light.css") screen and (prefers-color-scheme: light); @import "./_fonts.css"; /************************************* |
