fix: add cursor-pointer to button in Tailwind v4#10400
Closed
SAY-5 wants to merge 1 commit intoshadcn-ui:mainfrom
Closed
fix: add cursor-pointer to button in Tailwind v4#10400SAY-5 wants to merge 1 commit intoshadcn-ui:mainfrom
SAY-5 wants to merge 1 commit intoshadcn-ui:mainfrom
Conversation
Tailwind v4 removed the preflight rule that set cursor: pointer on button elements, so buttons no longer show a pointer cursor on hover. Added cursor-pointer to the new-york-v4 button component's base className and to the .cn-button class in all six theme style sheets (luma, vega, nova, lyra, maia, mira). This restores the expected pointer cursor behavior across all button variants and styles. Fixes shadcn-ui#6843
Contributor
|
@SAY-5 is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tailwind v4 dropped the preflight rule that previously set
cursor: pointeronbuttonelements, so shadcn buttons no longer show a pointer cursor when hovered. This is the root cause of the issue reported in #6843.The fix adds
cursor-pointerto:apps/v4/registry/new-york-v4/ui/button.tsx— added to the basecvaclass stringapps/v4/registry/styles/style-luma.css— added to.cn-button@applyapps/v4/registry/styles/style-vega.css— sameapps/v4/registry/styles/style-nova.css— sameapps/v4/registry/styles/style-lyra.css— sameapps/v4/registry/styles/style-maia.css— sameapps/v4/registry/styles/style-mira.css— sameThe
disabled:pointer-events-nonethat was already present means disabled buttons won't receive the pointer cursor, so no additional guard is needed.Closes #6843