diff --git a/package.json b/package.json index 9025c91..1c390a3 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "index.js" ], "dependencies": { - "css-color-function": "^1.3.0", + "css-color-function": "~1.3.3", "postcss": "^6.0.1", "postcss-message-helpers": "^2.0.0", "postcss-value-parser": "^3.3.0" diff --git a/test/fixtures/color.css b/test/fixtures/color.css index 4ee21ac..335dc73 100644 --- a/test/fixtures/color.css +++ b/test/fixtures/color.css @@ -10,3 +10,9 @@ body { border-color: color(#999 a(0.8)) color(#999 a(0.8)); } + +.withAlpha { + color: color(black a(80%) contrast(99%)); + background-color: color(red a(50%) shade(50%)); + border-color: color(red a(80%) tint(50%)); +} diff --git a/test/fixtures/color.expected.css b/test/fixtures/color.expected.css index 01cea60..f525b85 100644 --- a/test/fixtures/color.expected.css +++ b/test/fixtures/color.expected.css @@ -10,3 +10,9 @@ body { border-color: rgba(153, 153, 153, 0.8) rgba(153, 153, 153, 0.8); } + +.withAlpha { + color: rgba(255, 255, 255, 0.8); + background-color: rgba(128, 0, 0, 0.5); + border-color: rgba(255, 128, 128, 0.8); +}