csso
csso copied to clipboard
RGBA to HSLA
Paste here : https://css.github.io/csso/csso.html (version 4.0.3)
The following css :
.test1 { background: rgba(255,255,255,.9); }
in Beautify’s mode you get something like :
.test1 { background: rgba(255,255,255,.9) }
According to the last Chrome’s or Firefox’s code inspector, when we switch from RGBA to HSLA we see that rgba (255, 255, 255, .9)
is converted to hsla (0deg, 0%, 100%, .9)
in the inpector.
As combining HSLA + optional zero unit, don’t rgba(255,255,255,.9)
(20 bytes) would be the same as hsla(0,0,100%,.9)
(17 bytes) ?
Edit : removed flex question according to https://github.com/css/csso/issues/410
There is currently no assumption in CSSO that hsl / hsla may be shorter than the rgb / rgba version. Such optimisation can be added. Personally I have no time for this now, but a PR is very welcome :)