Is using #0000 for transparent fairly new?

My original question was:

Does CSS hex colors support a 4 digit syntax?

Should #0000 be changed to #000?

https://jsfiddle.net/f36tqmbs/

I found this: “The CSS 4-digit hex color notation is shorthand for the 8-digit hex notation.”

So then using this is fine. #0000

2nd Question: Is using #0000 for transparent fairly new?

Also, is there any documentation on it?

See Hexadecimal notation: #RGB[A] here:

4 Likes

https://caniuse.com/css-rrggbbaa 2016-2017

The CSS Color Module Level 4 defines new 4 & 8 character hex notation for color to include the opacity level.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.