-
Notifications
You must be signed in to change notification settings - Fork 48.4k
Improve DevTools CSS variables situation #22678
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I was looking into it and here is what I have in mind: Exposing all vars using
Example: https://codesandbox.io/s/quiet-fast-exg5q?file=/src/App.js
|
@jyash97 Oh! That's a very eloquent solution! So DevTools can just re-export the components we use, with the style decoration. Love it! |
Glad you liked it 😄 Can I create a draft PR for the above solution ? |
Yes, please do! |
Related to this comment: #22660 (review)
The majority of DevTools theme colors are stored in
packages/react-devtools-shared/src/constants
:react/packages/react-devtools-shared/src/constants.js
Lines 75 to 383 in 5cccacd
But some of them are also stored in
packages/react-devtools-shared/src/devtools/views/root.css
:react/packages/react-devtools-shared/src/devtools/views/root.css
Lines 2 to 18 in 5cccacd
This is because of how they are referenced in a theme-agnostic way by Reach UI style overrides (for things like tooltips and context menus).
Can we do better here, at least to ensure they stay in sync? For example, can the
ThemeProvider
set the redundant values at the root level when theSettingsContext
theme changes?The primary goals of the current architecture are:
The text was updated successfully, but these errors were encountered: