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

.rs.api.getThemeInfo() no longer returns foreground and background colors #4055

Closed
javierluraschi opened this issue Dec 18, 2018 · 1 comment
Assignees
Milestone

Comments

@javierluraschi
Copy link
Contributor

I believe there was a good reason to remove from .rs.api.getThemeInfo() the foreground and background fields by adding support for custom themes, but r2d3 and other packages could still make use of getting the foreground and background programmatically.

Related to rstudio/r2d3#50

@jmcphers
Copy link
Member

If memory serves, we removed this because it was implemented by hand-extracting foreground and background colors from the hard-coded theme list. Now that you can load any old CSS file as a theme, attempting to scrape out the fore and back colors is somewhat difficult without doing some level of finicky parsing and interpretation of the CSS.

I wonder, though, if there's another way to do it -- we could have the browser send the server its current theme values (just by reading the computed style off the screen) after application and whenever the theme changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants