Repository navigation
Conversation
Tailwind v4 dropped the v3 preflight rule that set `cursor: pointer` on `button, [role="button"]`, so every <button> in the web app fell back to the UA default. <a> elements (nav links, GitHub icon) were unaffected, which is why only the locale switcher and dark-mode toggle looked broken in the header. Restore the rule once in globals.css instead of adding `cursor-pointer` to each of the 18 buttons. `:not(:disabled)` keeps disabled playback controls on the default cursor. Closes shareAI-lab#594
This branch has not been deployed
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.
Fixes #594.
What was wrong
Every
<button>inweb/stayed on the browser's default arrow cursor when hovered — the locale switcher and dark-mode toggle in the header are the most visible, but the same applied to the Compare/Diff tabs, the simulator and visualization playback controls, and the Design Decisions collapsibles.Cause:
web/is on Tailwind CSS v4, whose preflight no longer contains the v3 rulebutton, [role="button"] { cursor: pointer }. Buttons therefore fall back tocursor: default, while<a>(nav links, GitHub icon) still getspointerfrom the UA stylesheet — hence the mixed appearance in the same header row.Confirmed against the production bundle: the only
cursordeclaration in the deployed CSS is.cursor-pointer, used exactly once (web/src/app/[locale]/page.tsx:219).Fix
Restore the rule once in
web/src/app/globals.css, rather than addingcursor-pointerto each of the 18 buttons::not(:disabled)is deliberate:step-controls.tsxandsimulator-controls.tsxhave disabled buttons, and those should keep the default cursor.Verification
npm ci && npm run buildinweb/succeeds, and the emitted CSS chunk containsbutton:not(:disabled),[role=button]:not(:disabled){cursor:pointer}.AI disclosure
I used an AI coding agent to trace the cause and draft this patch. I read the full diff, ran the build, and stand behind the change.