PostCSS Color Hsl
![Coverage Status](https://camo.githubusercontent.com/a7abff43ad606196fee209c83ead2a55872ff23cb0a6800424ee4c47e2fca74b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f646d61726368656e612f706f73746373732d636f6c6f722d68736c2f62616467652e737667)
PostCSS plugin to transform W3C CSS Color Module Level 4 hsl() new syntax to more compatible CSS (comma-separated hsl() or hsla()).
CSS Colors 4 syntax
hsl() = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? )
<hue> = <number> | <angle>
<alpha-value> = <number> | <percentage>
CSS Colors 3 syntax (actual)
hsl() = hsl( <hue>, <percentage>, <percentage> )
hsla() = hsla( <hue>, <percentage>, <percentage>, <alpha-value> )
<hue> = <number>
<alpha-value> = <number>
Example
.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);
}
Usage
postcss([ require('postcss-color-hsl') ])
See PostCSS docs for examples for your environment.