[system] decomposeColor has null value when string has whitespace #44504
Labels
dx
Related to developers' experience
package: system
Specific to @mui/system
status: expected behavior
Does not imply the behavior is intended. Just that we know about it and can't work around it
Steps to reproduce
Steps:
Current behavior
Alpha value returned by
decomposeColor
isnull
when the color string passed has whitespace before/after value. Due to this,darken
(and probably other functions) returnNaN
when calculating proper values.Expected behavior
Trim whitespace, or give a warning in the console.
Context
No response
Your environment
npx @mui/envinfo
Search keywords: decomposeColor darken NaN
The text was updated successfully, but these errors were encountered: