postcss-hsl-color-function

0.0.3 • Public • Published

PostCSS Hsl Color Function

PostCSS plugin to transform HSL color function to more compatible CSS. Inspired and modified from postcss-sass-color-functions.

Installation

$ npm install postcss-hsl-color-function

Usage

postcss([require('postcss-hsl-color-function')])

Before:

.foo {
  color: hue(red120)
}

After:

.foo {
  color: rgb(0, 255, 0)
}

Checkout test.js for examples.

Currently supported functions

  • hue(color, degree)
  • saturation(color, percentage)
  • lightness(color, percentage)

and their aliases:

  • h(color, degree)
  • s(color, percentage)
  • l(color, percentage)

Package Sidebar

Install

npm i postcss-hsl-color-function

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • yi.yang