postcss-color-hsl
PostCSS plugin to transform W3C CSS Color Module Level 4 hsl() new syntax to more compatible CSS (comma-separated hsl() or hsla())
Last updated 3 years ago by dmarchena .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install postcss-color-hsl 
SYNC missed versions from official npm registry.

PostCSS Color Hsl Build Status Coverage Status

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.

Current Tags

  • 2.0.0                                ...           latest (3 years ago)

7 Versions

  • 2.0.0                                ...           3 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 670
This Week 4,920
This Month 18,352
Last Day 288
Last Week 5,171
Last Month 18,082
Dependencies (3)
Dev Dependencies (11)

Copyright 2014 - 2016 © taobao.org |