In react we've got a component that does effectively
<div style={{background: 'rgb(var(--my-var, 0, 0, 0));'}} />
and when we later coerce that to a string per jest snapshot tests, we get back
<div style="background: rgb(var(--my-var, 0, 0, 0)) rgb(var(--my-var, 0, 0, 0));"></div>
Best I can tell this is due to it being parsed as valid for both background-color and background-image per
|
if (type === exports.TYPES.NULL_OR_EMPTY_STR || type === exports.TYPES.VAR) { |
. I.e. the value in question is being detected as a variable (which isn't completely inaccurate, given its use of
var() internally). However, the wrapping
rgb should indicate it's not valid for
background-image?