-
Notifications
You must be signed in to change notification settings - Fork 226
Add default box shadow reset #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/tailwindlabs/tailwindcss-forms/ALZxhNrELXRTnsb4jfiKFgDmvev4 |
We'll need to add this to the other elements that use shadows for focus rings too, like checkboxes/radios/maybe others 👍🏻 |
a00597d
to
d84d728
Compare
@adamwathan Good catch! Updated the others as well, only added it for the "base" elements (so not for the ones with :checked or other pseudo's) |
src/index.js
Outdated
@@ -237,6 +240,7 @@ const forms = plugin.withOptions(function (options = { strategy: 'base' }) { | |||
padding: '0', | |||
'font-size': 'unset', | |||
'line-height': 'inherit', | |||
'--tw-shadow': '0 0 #0000', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this one needed? I can't think for sure but maybe it's not since we don't use box-shadow
for any focus styles on file inputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, yeah I added it because I wanted to make sure that I got all the base
cases, but we are indeed not adding any focus styles for this one.
However if we eventually do, probably not though, then we can't forget to add these back.
Looking good man thanks! I think we can simplify the box shadow calls to this now: - 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)`,
+ 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, ...since |
d84d728
to
241ac86
Compare
This PR adds a reset for the shadow to each input element, this is necessary because we are trying to get rid of the universal selector.
See: tailwindlabs/tailwindcss#5517
Fixes: tailwindlabs/tailwindcss#5042