Skip to content

Commit add1126

Browse files
authored
Merge pull request #81 from tailwindlabs/add-box-shadow-reset
Add default box shadow reset
2 parents 39946dd + a7680e8 commit add1126

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
4040
'padding-left': spacing[3],
4141
'font-size': baseFontSize,
4242
'line-height': baseLineHeight,
43+
'--tw-shadow': '0 0 #0000',
4344
'&:focus': {
4445
outline: outline.none[0],
4546
'outline-offset': outline.none[1],
@@ -49,7 +50,7 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
4950
'--tw-ring-color': theme('colors.blue.600', colors.blue[600]),
5051
'--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`,
5152
'--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)`,
52-
'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)`,
53+
'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`,
5354
'border-color': theme('colors.blue.600', colors.blue[600]),
5455
},
5556
},
@@ -126,6 +127,7 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
126127
'background-color': '#fff',
127128
'border-color': theme('colors.gray.500', colors.gray[500]),
128129
'border-width': borderWidth['DEFAULT'],
130+
'--tw-shadow': '0 0 #0000',
129131
},
130132
},
131133
{
@@ -154,7 +156,7 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) {
154156
'--tw-ring-color': theme('colors.blue.600', colors.blue[600]),
155157
'--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`,
156158
'--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)`,
157-
'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)`,
159+
'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`,
158160
},
159161
},
160162
{

0 commit comments

Comments
 (0)