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
{{ message }}
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.
In v10 I was able to retrieve any current value of the entire theme object from the current ThemeProvider via the th utility, which would get the default value if the one in the current theme is not set.
For example, in v10 I could style a react-select element via:
Unless I've specified the formControl.background in my own theme, the rendered css returns an invalid value of background-color: formControl.background;. Background is a trivial example, however the same applies to color, border, etc.
The way around this would be to deep merge the default theme from @smooth-ui/core-sc, into my own theme, however then I still can't retrieve values from the current mode or colors.formControl.
Last working version
Worked up to version: v10
Stopped working in version: v11
To Reproduce
Steps to reproduce the behavior:
See above and CodeSandbox
Expected behavior
While the default Input component from @smooth-ui/core-sc is able to receive the default and mode values, they cannot be used in any custom component without setting the values manually in each theme.
Expect same behaviour from v10 where the entire theme object is available in the th utility, with values from the closest ThemeProvider
💥 Regression Report
In v10 I was able to retrieve any current value of the entire
theme
object from the currentThemeProvider
via theth
utility, which would get the default value if the one in the current theme is not set.For example, in v10 I could style a
react-select
element via:In v11, if I try:
Unless I've specified the
formControl.background
in my own theme, the rendered css returns an invalid value ofbackground-color: formControl.background;
. Background is a trivial example, however the same applies to color, border, etc.The way around this would be to deep merge the default
theme
from@smooth-ui/core-sc
, into my own theme, however then I still can't retrieve values from the currentmode
orcolors.formControl
.Last working version
Worked up to version: v10
Stopped working in version: v11
To Reproduce
Steps to reproduce the behavior:
See above and CodeSandbox
Expected behavior
While the default
Input
component from@smooth-ui/core-sc
is able to receive the default and mode values, they cannot be used in any custom component without setting the values manually in each theme.Expect same behaviour from v10 where the entire
theme
object is available in theth
utility, with values from the closestThemeProvider
Link to repl or repo (highly encouraged)
https://codesandbox.io/s/purple-hill-4wxye - See comments in App.js
Issues without a reproduction link are likely to stall.
Run
npx envinfo --system --binaries --npmPackages @smooth-ui/core-sc,@smooth-ui/core-em,styled-components,@emotion/core,@emotion/styled,emotion-theming --markdown --clipboard
Paste the results here:
The text was updated successfully, but these errors were encountered: