Skip to content

Commit 3b565d1

Browse files
committed
Add opacity modifiers for color utilities
1 parent 30e0cb1 commit 3b565d1

25 files changed

+24761
-521
lines changed

__tests__/fixtures/tailwind-output-important.css

Lines changed: 12240 additions & 0 deletions
Large diffs are not rendered by default.

__tests__/fixtures/tailwind-output.css

Lines changed: 12240 additions & 0 deletions
Large diffs are not rendered by default.

__tests__/flattenColorPalette.test.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import flattenColorPalette from '../src/util/flattenColorPalette'
2+
3+
test('it flattens nested color objects', () => {
4+
expect(
5+
flattenColorPalette({
6+
purple: 'purple',
7+
white: {
8+
25: 'rgba(255,255,255,.25)',
9+
50: 'rgba(255,255,255,.5)',
10+
75: 'rgba(255,255,255,.75)',
11+
default: '#fff',
12+
},
13+
red: {
14+
1: 'rgb(33,0,0)',
15+
2: 'rgb(67,0,0)',
16+
3: 'rgb(100,0,0)',
17+
},
18+
green: {
19+
1: 'rgb(0,33,0)',
20+
2: 'rgb(0,67,0)',
21+
3: 'rgb(0,100,0)',
22+
},
23+
blue: {
24+
1: 'rgb(0,0,33)',
25+
2: 'rgb(0,0,67)',
26+
3: 'rgb(0,0,100)',
27+
},
28+
})
29+
).toEqual({
30+
purple: 'purple',
31+
'white-25': 'rgba(255,255,255,.25)',
32+
'white-50': 'rgba(255,255,255,.5)',
33+
'white-75': 'rgba(255,255,255,.75)',
34+
white: '#fff',
35+
'red-1': 'rgb(33,0,0)',
36+
'red-2': 'rgb(67,0,0)',
37+
'red-3': 'rgb(100,0,0)',
38+
'green-1': 'rgb(0,33,0)',
39+
'green-2': 'rgb(0,67,0)',
40+
'green-3': 'rgb(0,100,0)',
41+
'blue-1': 'rgb(0,0,33)',
42+
'blue-2': 'rgb(0,0,67)',
43+
'blue-3': 'rgb(0,0,100)',
44+
})
45+
})

__tests__/plugins/backgroundColor.test.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

__tests__/plugins/borderColor.test.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

__tests__/plugins/divideColor.test.js

Lines changed: 0 additions & 89 deletions
This file was deleted.

__tests__/plugins/fill.test.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)