It seems as though there's an issue with how Preact handles style props when values are explicitly undefined. It seems to be a little more nuanced than it just leaving undefined in though – I think it happens only when the object property was previously defined, and later becomes undefined:
To Reproduce
Expected behavior
I would expect the --x css property to actually be deleted when it becomes undefined, as this is what happens on initial render.
It seems as though there's an issue with how Preact handles style props when values are explicitly
undefined. It seems to be a little more nuanced than it just leavingundefinedin though – I think it happens only when the object property was previously defined, and later becomes undefined:To Reproduce
Expected behavior
I would expect the
--xcss property to actually be deleted when it becomesundefined, as this is what happens on initial render.