You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I should be able to use CSS custom properties as values in theme.global.colors.background, without dark-mode being broken.
Actual Behavior
Setting theme.global.colors.background to anything besides a HEX value causes colorIsDark to return undefined, which then causes backgroundIsDark to return undefined. If you explicitly pass "dark" to the themeMode prop of the Grommet component, theme.dark is undefined.
URL, screen shot, or Codepen exhibiting the issue
N/A
Steps to Reproduce
Set theme.global.colors.background to var(--colors-black, blue)
Pass "dark" to the themeMode prop of the Grommet component
Open React dev-tools and find the first ContextProvider below the Grommet component, expanding the theme value and scrolling down to the dark property. It should be undefined
Your Environment
Grommet version: 2.35.0
Browser Name and version: Chrome 122.0.6261.69
Operating System and version (desktop or mobile): Ubuntu 23 (desktop)
The text was updated successfully, but these errors were encountered:
Expected Behavior
I should be able to use CSS custom properties as values in
theme.global.colors.background
, without dark-mode being broken.Actual Behavior
Setting
theme.global.colors.background
to anything besides a HEX value causescolorIsDark
to returnundefined
, which then causesbackgroundIsDark
to returnundefined
. If you explicitly pass "dark" to thethemeMode
prop of theGrommet
component,theme.dark
isundefined
.URL, screen shot, or Codepen exhibiting the issue
N/A
Steps to Reproduce
theme.global.colors.background
tovar(--colors-black, blue)
themeMode
prop of theGrommet
componentContextProvider
below theGrommet
component, expanding the theme value and scrolling down to thedark
property. It should be undefinedYour Environment
The text was updated successfully, but these errors were encountered: