@csstools/postcss-color-mix-function
Use the color-mix function in CSS
Last updated 2 years ago by alaguna .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install @csstools/postcss-color-mix-function 
SYNC missed versions from official npm registry.

PostCSS Color Mix Function PostCSS Logo

npm version CSS Standard Status Build Status Discord

PostCSS Color Mix Function lets you use the color-mix() function following the CSS Color 5 Specification.

.purple_plum {
	color: color-mix(in lch, purple 50%, plum 50%);
}

/* becomes */

.purple_plum {
	color: rgb(175, 92, 174);
}

Usage

Add PostCSS Color Mix Function to your project:

npm install postcss @csstools/postcss-color-mix-function --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssColorMixFunction = require('@csstools/postcss-color-mix-function');

postcss([
	postcssColorMixFunction(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

PostCSS Color Mix Function runs in all Node environments, with special instructions for:

Options

preserve

The preserve option determines whether the original notation is preserved. By default, it is not preserved.

postcssColorMixFunction({ preserve: true })
.purple_plum {
	color: color-mix(in lch, purple 50%, plum 50%);
}

/* becomes */

.purple_plum {
	color: rgb(175, 92, 174);
	color: color-mix(in lch, purple 50%, plum 50%);
}

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |