color
color copied to clipboard
Unable to parse RGBA no comma alpha value in percentage.
Unable to parse rgba(0 0 0 26%)
color where it is a valid color and should be parsed. When passed the same color value including it comma or alpha value as ratio it is parsed correctly.
Are you sure this is a valid part of the spec?
Yes I'm sure.
Here is specification of rgb(a)
color on MDN
<rgb()> =
rgb( [ <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? ) |
rgb( [ <number> | none ]{3} [ / [ <alpha-value> | none ] ]? )
<alpha-value> =
<number> |
<percentage>
Ah it's a new syntax change, fun. PR is welcome, both syntaxes need to be supported.
Sure. Thanks for replying 🙂
Unable to parse
rgba(0 0 0 26%)
color where it is a valid color and should be parsed. When passed the same color value including it comma or alpha value as ratio it is parsed correctly.
rgba(0 0 0 26%)
isn't supported by browsers,rgba(0 0 0 / 26%)
is ok.
There's technically nothing about this package that mandates it's an exact parity of browser support. I think as long as this package is a superset of what the browsers support, so long as what is supported is to an official spec, then it's acceptable.