views:

167

answers:

1

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);
}
+1  A: 

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%);
}
KennyTM