cssinjs/jss
View on GitHubPrevious styles not being removed when returning 'null' values using dynamic rule sets.
Open
#1421 opened on Nov 7, 2020
bughelp wanted
Description
NOTE: Similar to https://github.com/cssinjs/jss/issues/1026, but with dynamic rule sets instead of dynamic values.
Just to clarify nomenclature... dynamic rule set Vs. dynamic value:
{
// DYNAMIC RULE SET
a: ({color}) => ({
display: 'inline',
color: color
}) ,
b: {
display: 'inline',
// DYNAMIC VALUE
color: ({ color }) => color
}
}
Expected behavior:
Previous applied values to be removed when respective value is set to null in a dynamic rule set.
Describe the bug: Previous values are not removed causing a number of trouble.
Codesandbox link: https://codesandbox.io/s/fervent-dawn-uomkr
Versions:
- JSS: 10.4.0
- Browser: All
- OS: macOS 10.15.7