diff --git a/CHANGELOG.md b/CHANGELOG.md index d415645..f03bb5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changes to PostCSS color-mod() Function +### 3.0.1 (September 18, 2018) + +- Fixed an issue with using the `transparent` color keyword +- Updated to PostCSS Values Parser 2 + ### 3.0.0 (August 30, 2018) - Added `importFrom` option which allows you to import Custom Properties from diff --git a/README.md b/README.md index 7670583..997b498 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![NPM Version][npm-img]][npm-url] [![CSS Standard Status][css-img]][css-url] [![Build Status][cli-img]][cli-url] -[![Windows Build Status][win-img]][win-url] [![Support Chat][git-img]][git-url] [PostCSS color-mod() Function] lets you modify colors using the `color-mod()` @@ -199,8 +198,6 @@ be used. [git-url]: https://gitter.im/postcss/postcss [npm-img]: https://img.shields.io/npm/v/postcss-color-mod-function.svg [npm-url]: https://www.npmjs.com/package/postcss-color-mod-function -[win-img]: https://img.shields.io/appveyor/ci/jonathantneal/postcss-color-mod-function.svg -[win-url]: https://ci.appveyor.com/project/jonathantneal/postcss-color-mod-function [CSS Color Module Level 4]: https://www.w3.org/TR/css-color-4/#funcdef-color-mod [Gulp PostCSS]: https://github.com/postcss/gulp-postcss diff --git a/lib/conversions.js b/lib/conversions.js index 416cf44..401e150 100644 --- a/lib/conversions.js +++ b/lib/conversions.js @@ -172,6 +172,7 @@ export function convertNtoRGB(name) { teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], + transparent: [0, 0, 0], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], diff --git a/package.json b/package.json index d056ed1..f63e25b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-color-mod-function", - "version": "3.0.0", + "version": "3.0.1", "description": "Modify colors using the color-mod() function in CSS", "author": "Jonathan Neal ", "license": "CC0-1.0", @@ -8,7 +8,7 @@ "homepage": "https://github.com/jonathantneal/postcss-color-mod-function#readme", "bugs": "https://github.com/jonathantneal/postcss-color-mod-function/issues", "main": "index.cjs.js", - "module": "index.es.js", + "module": "index.es.mjs", "files": [ "index.cjs.js", "index.cjs.js.map", @@ -29,12 +29,12 @@ "dependencies": { "@csstools/convert-colors": "^1.4.0", "postcss": "^7.0.2", - "postcss-values-parser": "^1.5.0" + "postcss-values-parser": "^2.0.0" }, "devDependencies": { - "@babel/core": "^7.0.1", + "@babel/core": "^7.1.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/preset-env": "^7.0.0", + "@babel/preset-env": "^7.1.0", "babel-eslint": "^9.0.0", "echint": "^4.0.1", "eslint": "^5.6.0", diff --git a/test/basic.colors.expect.css b/test/basic.colors.expect.css index 206e680..bf9b9b5 100644 --- a/test/basic.colors.expect.css +++ b/test/basic.colors.expect.css @@ -141,3 +141,7 @@ test-linear-gradient { test-var-blend { color: rgb(90% 0% 10%); } + +test-transparent { + color: rgb(0% 0% 0%); +} diff --git a/test/basic.css b/test/basic.css index 1d047a3..d972063 100644 --- a/test/basic.css +++ b/test/basic.css @@ -141,3 +141,7 @@ test-linear-gradient { test-var-blend { color: color-mod(var(--color-red) blend(var(--color) 10%)); } + +test-transparent { + color: color-mod(transparent shade(10%)); +} diff --git a/test/basic.expect.css b/test/basic.expect.css index 6f0e072..1c02978 100644 --- a/test/basic.expect.css +++ b/test/basic.expect.css @@ -141,3 +141,7 @@ test-linear-gradient { test-var-blend { color: rgb(230, 0, 26); } + +test-transparent { + color: rgb(0, 0, 0); +}