I found a weird CSS validation result: when rgba()
is used to background
, it does not validate, however, the workaround is rgba()
for background-color
. Why that rule exists? Is it a validator's bug?
Try to validate the following there, and you can see the result:
div {
background: rgba(0, 0, 0, 0.5);
}
and
div {
background-color: rgba(0, 0, 0, 0.5);
}
I think it's validator's bug. For example, HSL color space is rejected too
.accepted {
background-color: hsl(1, 1%, 1%);
}
.rejected {
background: hsl(1, 1%, 1%);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With