r-lib / pkgdown

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

Test white background for plots in dark mode #2730

Open jayhesselberth opened 4 months ago

jayhesselberth commented 4 months ago

Closes #2729

github-actions[bot] commented 4 months ago

🚀 Deployed on https://66a1407f56955010de4e0180--pkgdown-dev.netlify.app

hadley commented 4 months ago

Hmmmm, is this a vignette specific problem? I re-looked at the scss and discovered that I added this for plots in examples:

pre .img, pre .r-plt {
  img {
    margin: 5px 0;
    background-color: #fff;
  }
}
// low-tech plot softening in dark mode
[data-bs-theme="dark"] pre img {
  opacity: 0.66;
  transition: opacity 250ms ease-in-out;

  &:hover, &:focus, &:active {opacity: 1;}
}