Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot() outputs require white background (or white lines?) for the dark mode website #2729

Open
avallecam opened this issue Jul 23, 2024 · 5 comments · May be fixed by #2730
Open

plot() outputs require white background (or white lines?) for the dark mode website #2729

avallecam opened this issue Jul 23, 2024 · 5 comments · May be fixed by #2730
Labels
front end 🌷 General HTML, CSS, and JS issues

Comments

@avallecam
Copy link

Currently, the plot() outputs are lost in the background when the dark mode is used.

Possibly the standard suggested action to do would be to try to keep the default white background.

reference link: https://pkgdown.r-lib.org/articles/test/rendering.html

image

@jayhesselberth
Copy link
Collaborator

jayhesselberth commented Jul 24, 2024

I think this is expected behavior as the default background color for base plots is transparent.

I set the background color to white in #2730 and the preview looks fine in dark mode.

Given this just another plot tweak, I think we'd leave it to users to set up parameters, and just leave this test in the vignette as a reminder of the issue.

@avallecam
Copy link
Author

I agree with the approach to let users set up the parameter. Thanks for adding that test to the vignette!

@hadley
Copy link
Member

hadley commented Jul 24, 2024

Hmmm, are you sure we shouldn't set the background colour with css?

@jayhesselberth
Copy link
Collaborator

Added the CSS approach to #2730, works fine so long as we explicitly set the logo background to transparent.

Or maybe we should only set background to white if dark-mode is active?

@jayhesselberth
Copy link
Collaborator

Are we not adding a CSS class to plot images? Would make it easier to target their backgrounds specifically.

@jayhesselberth jayhesselberth added the front end 🌷 General HTML, CSS, and JS issues label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front end 🌷 General HTML, CSS, and JS issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants