I was sure that the proper way to use hsla()
is something like
background: hsla(0deg, 100%, 50%, 0.5); /* The same as rgba(255, 0, 0, 0.5); */
However, if I create a paragraph with background: rgba(255, 0, 0, 0.5)
and shift-click that color in Chrome DevTools (Ctrl+Shift+I), the color is converted to
hsl(0deg 100% 50% / 50%);
Notice that the alpha channel is now separated by a slash and the name of a function is hsl
rather than hsla
.
Neither w3schools nor MDN mention this notation.
Why Chrome use it?