<ypi9edevwp02.fsf@gmail.com>
Hello, How do you do dark/light mode for code blocks in darkman's website? My website is built using org-publish as well (https://p00f.srht.site), but I could get dark mode working only for prose. For code, I keep the background light.
<87ttnr4ba5.fsf@esprit.tn>
You will have to create your own stylesheet because Org bundles a very basic stylesheet. darkman.grtcdr.tn and other sites of mine use a shared set of stylesheets called Carrara [1]. The idea is to define a color palette, using variables (also referred to as custom properties), for each value of the prefers-color-scheme [2] media query [3] rule. The color values of the palette are defined in color.less [4] and then bound to their corresponding syntactic element in code.less [5]. 1. https://git.sr.ht/~grtcdr/carrara 2. https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme 3. https://developer.mozilla.org/en-US/docs/Web/CSS/@media 4. https://git.sr.ht/~grtcdr/carrara/tree/master/item/less/color.less 5. https://git.sr.ht/~grtcdr/carrara/tree/d9c96c5cc8dafa63eff2e32f5e0af70f742c1a55/item/less/code.less#L44-58 Best regards, -- Aziz