The previous regex for light-dark was not taking into account values with variables and css color functions such as:
light-dark(rgb(0, 0, 0), var(--color))
Also, nested light-dark was not supported (we need to recursively "unwrap" light-dark in this case). Although using this syntax does not make any sense because this:
light-dark(light-dark(white, red), red)
is equivalent to this:
light-dark(white, red)
but this syntax is valid that's why we need to support it
The previous regex for
light-dark
was not taking into account values with variables and css color functions such as:Also, nested
light-dark
was not supported (we need to recursively "unwrap"light-dark
in this case). Although using this syntax does not make any sense because this:is equivalent to this:
but this syntax is valid that's why we need to support it