Skip to content
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

Apply reset for box shadow #4513

Closed
wants to merge 1 commit into from

Conversation

kluvin
Copy link

@kluvin kluvin commented Mar 22, 2021

Hello!

I ran into an issue with Tailwind's forms plugin, where a box shadow is applied on focus. This might also be a general issue wherever a box shadow is used for the input box.

This patch resolves the issue for me. Let me know if I should change anything.

@changeset-bot
Copy link

changeset-bot bot commented Mar 22, 2021

⚠️ No Changeset found

Latest commit: cfea83a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cfea83a:

Sandbox Source
react-codesandboxer-example Configuration

@ebonow
Copy link
Collaborator

ebonow commented Mar 22, 2021

Greetings @kluvin ,

I appreciate the contribution, but this could be a breaking change for some users.

To answer the root problem you are running into, can you try the following and see if this resolves your issue without impacting the source code?

const styles = {
  input: css => ({ 
    ...css, 
    input: { boxShadow: 'none' }   
})

return <Select styles={styles} {...otherProps} />

@kluvin
Copy link
Author

kluvin commented Mar 22, 2021

More or less that is my current solution. Although one needs to nest down to actual input:

const styles = {
  input = css => ({
    ...css,
    '& div': {
      '& input': {
        boxShadow: 'none !important',
      }
    }
  })
}

@kluvin kluvin closed this Mar 22, 2021
@ebonow ebonow mentioned this pull request Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants