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

Ensure white background when rendering via reprex:::preview() #468

Closed
yjunechoe opened this issue Aug 24, 2024 · 0 comments · Fixed by #470
Closed

Ensure white background when rendering via reprex:::preview() #468

yjunechoe opened this issue Aug 24, 2024 · 0 comments · Fixed by #470

Comments

@yjunechoe
Copy link

This is an issue in visual display that first caught my eye transitioning form RStudio to Positron. I wasn't sure (and am still not quite sure) whether this issue belongs here or in Positron, but I decided to post here after a detour investigation (more details in this thread https://fosstodon.org/@yjunechoe/112997187221404762)

I'm a dark mode IDE user. In RStudio, reprexes have always rendered in the Viewer panel with a white background, regardless of editor theme. But in Positron, I'm seeing reprexes render with transparent background, and dark background sets a bad contrast against the contents of the reprex.

reprex::reprex("1")

image

Maybe this reflects a fundamental difference in how RStudio and Positron render Github flavored markdown in the Viewer. But in any case I can confirm that just injecting the background: white; css somewhere in the document can prevent the reprex from visually blending into the IDE background. So it would be nice if reprex:::preview() could guarantee a white-background hml at least when rendering interactively to the viewer, if that's a desirable behavior to hard-code.

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 a pull request may close this issue.

1 participant