Skip to content

Commit 2bd8f7e

Browse files
authored
Merge pull request #89 from tailwindlabs/outline-none-fix
Remove dependency on old `outline.none` config value
2 parents 491a834 + ce5386b commit 2bd8f7e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const plugin = require('tailwindcss/plugin')
33
const defaultTheme = require('tailwindcss/defaultTheme')
44
const colors = require('tailwindcss/colors')
55
const [baseFontSize, { lineHeight: baseLineHeight }] = defaultTheme.fontSize.base
6-
const { spacing, borderWidth, borderRadius, outline } = defaultTheme
6+
const { spacing, borderWidth, borderRadius } = defaultTheme
77

88
const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
99
return function ({ addBase, theme }) {
@@ -43,8 +43,8 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
4343
'line-height': baseLineHeight,
4444
'--tw-shadow': '0 0 #0000',
4545
'&:focus': {
46-
outline: outline.none[0],
47-
'outline-offset': outline.none[1],
46+
outline: '2px solid transparent',
47+
'outline-offset': '2px',
4848
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
4949
'--tw-ring-offset-width': '0px',
5050
'--tw-ring-offset-color': '#fff',
@@ -149,8 +149,8 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
149149
base: [`[type='checkbox']:focus`, `[type='radio']:focus`],
150150
class: ['.form-checkbox:focus', '.form-radio:focus'],
151151
styles: {
152-
outline: outline.none[0],
153-
'outline-offset': outline.none[1],
152+
outline: '2px solid transparent',
153+
'outline-offset': '2px',
154154
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
155155
'--tw-ring-offset-width': '2px',
156156
'--tw-ring-offset-color': '#fff',

0 commit comments

Comments
 (0)