Skip to content

Commit 5c16689

Browse files
committed
Update Tailwind version, account for ring API changes
1 parent d0b9fd9 commit 5c16689

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"postcss": "^7.0.17"
2323
},
2424
"dependencies": {
25-
"tailwindcss": "^2.0.0-alpha.15",
26-
"mini-svg-data-uri": "^1.2.3"
25+
"mini-svg-data-uri": "^1.2.3",
26+
"tailwindcss": "^2.0.0-alpha.16"
2727
}
2828
}

src/index.js

+13-11
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,18 @@ const forms = plugin(function ({ addBase, theme }) {
3737
'&:focus': {
3838
outline: outline.none[0],
3939
'outline-offset': outline.none[1],
40-
'--ring-offset-shadow': `0 0 0 var(--ring-offset-width, 0) var(--ring-offset-color, #fff)`,
41-
'--ring-shadow': `0 0 0 calc(1px + var(--ring-offset-width, 0px)) var(--ring-color, ${theme(
42-
'colors.blue.600',
43-
colors.blue[600]
44-
)})`,
40+
'--ring-inset': 'var(--tailwind-empty,/*!*/ /*!*/)',
41+
'--ring-offset-width': '0px',
42+
'--ring-offset-color': '#fff',
43+
'--ring-color': theme('colors.blue.600', colors.blue[600]),
44+
'--ring-offset-shadow': `var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color)`,
45+
'--ring-shadow': `var(--ring-inset) 0 0 0 calc(1px + var(--ring-offset-width)) var(--ring-color)`,
4546
'box-shadow': `var(--ring-offset-shadow), var(--ring-shadow), var(--box-shadow, 0 0 #0000)`,
4647
'border-color': theme('colors.blue.600', colors.blue[600]),
4748
},
4849
},
4950

50-
'::placeholder': {
51+
'input::placeholder, textarea::placeholder': {
5152
color: theme('colors.gray.400', colors.gray[400]),
5253
opacity: '1',
5354
},
@@ -120,11 +121,12 @@ const forms = plugin(function ({ addBase, theme }) {
120121
`]: {
121122
outline: outline.none[0],
122123
'outline-offset': outline.none[1],
123-
'--ring-offset-shadow': `0 0 0 var(--ring-offset-width, 2px) var(--ring-offset-color, #fff)`,
124-
'--ring-shadow': `0 0 0 calc(2px + var(--ring-offset-width, 2px)) var(--ring-color, ${theme(
125-
'colors.blue.600',
126-
colors.blue[600]
127-
)})`,
124+
'--ring-inset': 'var(--tailwind-empty,/*!*/ /*!*/)',
125+
'--ring-offset-width': '2px',
126+
'--ring-offset-color': '#fff',
127+
'--ring-color': theme('colors.blue.600', colors.blue[600]),
128+
'--ring-offset-shadow': `var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color)`,
129+
'--ring-shadow': `var(--ring-inset) 0 0 0 calc(2px + var(--ring-offset-width)) var(--ring-color)`,
128130
'box-shadow': `var(--ring-offset-shadow), var(--ring-shadow), var(--box-shadow, 0 0 #0000)`,
129131
'border-color': theme('colors.gray.300', colors.gray[300]),
130132
},

0 commit comments

Comments
 (0)