PostCSS plugin to transform W3C CSS Color Module Level 4 hsl() new syntax to more compatible CSS (comma-separated hsl() or hsla()).
hsl() = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? )
<hue> = <number> | <angle>
<alpha-value> = <number> | <percentage>
hsl() = hsl( <hue>, <percentage>, <percentage> )
hsla() = hsla( <hue>, <percentage>, <percentage>, <alpha-value> )
<hue> = <number>
<alpha-value> = <number>
.foo {
/* Input example */
color: hsl(0 100% 50%);
border-color: hsl(200grad 100% 50% / 20%);
}
.foo {
/* Output example */
color: hsl(0, 100%, 50%);
border-color: hsla(180, 100%, 50%, .2);
}
postcss([ require('postcss-color-hsl') ])
See PostCSS docs for examples for your environment.