Skip to content

Commit

Permalink
Merge pull request #1627 from tailwindcss/alpha-colors
Browse files Browse the repository at this point in the history
Add opacity modifiers for color utilities
  • Loading branch information
adamwathan authored Apr 26, 2020
2 parents 30e0cb1 + f94e2c3 commit 857e2d3
Show file tree
Hide file tree
Showing 25 changed files with 24,761 additions and 521 deletions.
12,240 changes: 12,240 additions & 0 deletions __tests__/fixtures/tailwind-output-important.css

Large diffs are not rendered by default.

12,240 changes: 12,240 additions & 0 deletions __tests__/fixtures/tailwind-output.css

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions __tests__/flattenColorPalette.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import flattenColorPalette from '../src/util/flattenColorPalette'

test('it flattens nested color objects', () => {
expect(
flattenColorPalette({
purple: 'purple',
white: {
25: 'rgba(255,255,255,.25)',
50: 'rgba(255,255,255,.5)',
75: 'rgba(255,255,255,.75)',
default: '#fff',
},
red: {
1: 'rgb(33,0,0)',
2: 'rgb(67,0,0)',
3: 'rgb(100,0,0)',
},
green: {
1: 'rgb(0,33,0)',
2: 'rgb(0,67,0)',
3: 'rgb(0,100,0)',
},
blue: {
1: 'rgb(0,0,33)',
2: 'rgb(0,0,67)',
3: 'rgb(0,0,100)',
},
})
).toEqual({
purple: 'purple',
'white-25': 'rgba(255,255,255,.25)',
'white-50': 'rgba(255,255,255,.5)',
'white-75': 'rgba(255,255,255,.75)',
white: '#fff',
'red-1': 'rgb(33,0,0)',
'red-2': 'rgb(67,0,0)',
'red-3': 'rgb(100,0,0)',
'green-1': 'rgb(0,33,0)',
'green-2': 'rgb(0,67,0)',
'green-3': 'rgb(0,100,0)',
'blue-1': 'rgb(0,0,33)',
'blue-2': 'rgb(0,0,67)',
'blue-3': 'rgb(0,0,100)',
})
})
83 changes: 0 additions & 83 deletions __tests__/plugins/backgroundColor.test.js

This file was deleted.

83 changes: 0 additions & 83 deletions __tests__/plugins/borderColor.test.js

This file was deleted.

89 changes: 0 additions & 89 deletions __tests__/plugins/divideColor.test.js

This file was deleted.

83 changes: 0 additions & 83 deletions __tests__/plugins/fill.test.js

This file was deleted.

Loading

0 comments on commit 857e2d3

Please sign in to comment.