glamor-color-function

0.0.3 • Public • Published

glamor-color-function

A port of postcss-color-function for glamor, using css-color-function.

Transform glamor declarations with color():

css({
  border: "1px solid pink",
  color: "color(blue blackness(+10%))",
  ":hover": { backgroundColor: "red" }
})

into

.css-1bl95om,[data-css-1bl95om]{
  border: 1px solid pink;
  color: rgb(0, 0, 230);
}
.css-1bl95om:hover,[data-css-1bl95om]:hover{
  background-color: red;
}

ECMAScript

You will need polyfills for the following features (which are provided for you if you are using babel's runtime).

  • Object.entries
  • "".startsWith()

A non-compiled version can be required at index.es.js and is specified as jsnext:main. This version includes the following language features in addition:

  • Destructuring
  • Object literal shorthand

Readme

Keywords

none

Package Sidebar

Install

npm i glamor-color-function

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • biscarch