cssinjs/jss
在 GitHub 查看Previous styles not being removed when returning 'null' values using dynamic rule sets.
Open
#1,421 建立於 2020年11月7日
bughelp wanted
描述
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