rstudio / bookdown

Authoring Books and Technical Documents with R Markdown
https://pkgs.rstudio.com/bookdown/
GNU General Public License v3.0
3.71k stars 1.27k forks source link

Consider introducing dark mode for bs4_book-theme #1023

Open henningsway opened 3 years ago

henningsway commented 3 years ago

I like the new theme, but I mostly read bookdown books in the night mode. With the new theme this no longer seems possible and I miss it. :)

May be related to https://github.com/rstudio/bookdown/issues/1021

MattCowgill commented 3 years ago

I came here to say the same thing! The theme is nice, but really needs dark mode

PythonCoderUnicorn commented 2 years ago

I also wish to add to this issues.

2 issues I want to bring up:

debruine commented 2 years ago

Seconding this. I just had a student leave an issue on one of our course books, saying it's an accessibility issue.

PythonCoderUnicorn commented 2 years ago

Seconding this. I just had a student leave an issue on one of our course books, saying it's an accessibility issue.

last week I found a solution, thematic and bslib package to load a custom themed Rmd. Not much attention is paid to this as it was a 1 page . Here is a solution I got to work in Rmd

---
output: 
  html_document: 
    theme: 
      bg: "#002b36"
      fg: "#eee8d5"
      primary: "#2aa198"
---

# inside a code chunk
thematic::thematic_rmd()
library(bslib)

# i also use ggdark::dark_mode() for all my plots
library(ggdark)

for me tibbles don't work with color theme or maybe it's user error but the plots work out just fine.

fernandoroa commented 1 month ago

I think something like the following is a desirable related idea too, toggles:
https://changelog.gitbook.com/may-2023/30-may-a-light-dark-mode-toggle-and-new-customization-options https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#color-palette-toggle