Skip to content

Commit 8b222f6

Browse files
tylergawjonathantneal
authored andcommitted
Tests and fix for upstream css-color-function bug (postcss#33)
* Writes failing tests to demo problem * Updates failing test (just getting travis to run) * Uses Ian's 1.3.1 tag of css-color-function * Points to latest 1.x series of color-func
1 parent 34791a5 commit 8b222f6

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"index.js"
1818
],
1919
"dependencies": {
20-
"css-color-function": "^1.3.0",
20+
"css-color-function": "~1.3.3",
2121
"postcss": "^6.0.1",
2222
"postcss-message-helpers": "^2.0.0",
2323
"postcss-value-parser": "^3.3.0"

test/fixtures/color.css

+6
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ body {
1010

1111
border-color: color(#999 a(0.8)) color(#999 a(0.8));
1212
}
13+
14+
.withAlpha {
15+
color: color(black a(80%) contrast(99%));
16+
background-color: color(red a(50%) shade(50%));
17+
border-color: color(red a(80%) tint(50%));
18+
}

test/fixtures/color.expected.css

+6
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ body {
1010

1111
border-color: rgba(153, 153, 153, 0.8) rgba(153, 153, 153, 0.8);
1212
}
13+
14+
.withAlpha {
15+
color: rgba(255, 255, 255, 0.8);
16+
background-color: rgba(128, 0, 0, 0.5);
17+
border-color: rgba(255, 128, 128, 0.8);
18+
}

0 commit comments

Comments
 (0)