r-lib / pkgdown

Generate static html documentation for an R package
https://pkgdown.r-lib.org/
Other
714 stars 334 forks source link

Document how custom theming interact with the lightswitch #2679

Closed maelle closed 3 months ago

maelle commented 3 months ago

If you use bslib variables for customization, how does that render in dark mode, etc.

Asking for a friend :wink: (I'll try to add some notes here)

Edit: https://getbootstrap.com/docs/5.3/customize/color-modes/#sass-variables is probably the answer :innocent:

maelle commented 3 months ago

Regarding themes, I see

(Themes are unlikely to work with the light switch, but you can try it and see.)

In Quarto one can select a different theme for light and dark: https://quarto.org/docs/websites/website-tools.html#dark-mode

hadley commented 3 months ago

Yeah, the lightswitch works a bit differently to the quarto equivalent