Skip to content

Add CSS filter for auto-dark figures#2919

Merged
jayhesselberth merged 2 commits intomainfrom
auto-dark
Oct 7, 2025
Merged

Add CSS filter for auto-dark figures#2919
jayhesselberth merged 2 commits intomainfrom
auto-dark

Conversation

@jayhesselberth
Copy link
Collaborator

Thanks to @gadenbuie

Fixes #2729. Closes #2854

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

🚀 Deployed on https://68e522ebe2d568154795ba5c--pkgdown-dev.netlify.app

@jayhesselberth

This comment was marked as outdated.

@jayhesselberth
Copy link
Collaborator Author

Not sure why I can't add you as a reviewer @gadenbuie — can you take a look?

Copy link
Contributor

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me! It'd be nice if the example plots involved a little bit of color to make sure the filters make sense.

I think your comment in the previous PR about differentiating between markdown images and rendered images is worth considering, but I took a quick look at knitr options and didn't find an immediately obvious way to do that...

@jayhesselberth
Copy link
Collaborator Author

Here's the transformed plot with added color:

CleanShot 2025-10-07 at 08 22 04@2x

@jayhesselberth
Copy link
Collaborator Author

Also FWIW confirmed to work on firefox

@jayhesselberth jayhesselberth merged commit 1f2f740 into main Oct 7, 2025
17 checks passed
@jayhesselberth jayhesselberth deleted the auto-dark branch October 7, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use better CSS transform for dark mode plots plot() outputs require white background (or white lines?) for the dark mode website

2 participants

Comments