color() function support for glamor
npm install glamor-color-functionA port of
postcss-color-function
for glamor, using
css-color-function.
Transform glamor declarations with color():
``javascript`
css({
border: "1px solid pink",
color: "color(blue blackness(+10%))",
":hover": { backgroundColor: "red" }
})
into
`css`
.css-1bl95om,[data-css-1bl95om]{
border: 1px solid pink;
color: rgb(0, 0, 230);
}
.css-1bl95om:hover,[data-css-1bl95om]:hover{
background-color: red;
}
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 isjsnext:main`. This version includes the following
specified as
language features in addition:
* Destructuring
* Object literal shorthand