Skip to content

Leopoldthecoder/postcss-hsl-color-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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(red, 120)
}

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)

About

PostCSS plugin to transform HSL color function to more compatible CSS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published