[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>
This commit is contained in:
tobi 2025-05-30 11:06:08 +02:00 committed by kim
commit 2c73bb3602
17 changed files with 75 additions and 31 deletions

View file

@ -27,6 +27,9 @@
THE SOFTWARE.
*/
/* Use light code highlights. */
@import url("../dist/_prism-light.css");
:root {
/* Define solarized palette */
--base3: #fdf6e3; /* Background. */
@ -135,8 +138,8 @@ html, body {
/* Code snippets */
pre, pre[class*="language-"],
code, code[class*="language-"] {
background-color: black;
color: #93a1a1;
background-color: #93a1a1;
color: black;
}
/* Block quotes */