#181
feat: add cursor-pointer rule for all clickable elements
Summary
Added CSS rules cursor: pointer for all clickable elements.
Changes
- global.css
Summary by CodeRabbit
- Style
- Improved cursor behavior for interactive controls: enabled elements now show a pointer cursor for clearer affordance, while disabled controls show a not-allowed cursor to indicate unavailability.
- Disabled detection now respects common disabled states and attributes so visual feedback remains consistent across buttons, links, inputs, and role-based controls.
Activity
5coderabbitai[bot]reviewed6mo ago
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/ui/src/styles/globals.css`:
- Around line 184-250: The interactive-selector group (notably the plain a[href]
and input[type="..."] selectors in the block containing button:not(:disabled)...
and a[href]) currently lacks explicit
:not([disabled])/:not([aria-disabled="true"])/:not([data-disabled]) exclusions
so elements like a[href][aria-disabled="true"] or
input[type="button"][data-disabled] still match the pointer rule; update the
group by adding the same exclusion list
(:not([disabled]):not([aria-disabled="true"]):not([data-disabled]):not([data-disabled="true"]))
to a[href] and each input[type="..."] selector (and any other plain selectors
such as label[for] or summary if needed) so disabled-marked elements no longer
receive cursor: pointer while keeping the existing disabled cursor rules intact.🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1b13f094-7d21-4325-9795-1d77b11d2d80
📥 Commits
Reviewing files that changed from the base of the PR and between 94ca24080d10dd2e59513db729b3a5135410e51d and c3630a8c74ac15b5ed87e37494dfacbd912a6761.
📒 Files selected for processing (1)
packages/ui/src/styles/globals.css
coderabbitai[bot]reviewed6mo ago
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/ui/src/styles/globals.css`:
- Around line 217-228: The global selector list including [role="menuitem"] and
[role="option"] is outside any `@layer` and is overriding Tailwind's
cursor-default utility on Radix components; fix by either removing
cursor-default from the component classNames on DropdownMenuItem,
DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuSubTrigger, and
SelectItem so the intent is explicit, or remove [role="menuitem"] and
[role="option"] from the selector list and move this cursor rule into an
appropriate `@layer` (e.g., `@layer` base) so it doesn't trump Tailwind utilities.🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f9ba31bf-591e-4062-91a7-1de87717902d
📥 Commits
Reviewing files that changed from the base of the PR and between c3630a8c74ac15b5ed87e37494dfacbd912a6761 and 7e69f8e840daeb5cbd4ac058ce99a3959cce3bc9.
📒 Files selected for processing (1)
packages/ui/src/styles/globals.css
📝 Walkthrough
Walkthrough
Adds global CSS rules in
@layer basethat setcursor: pointerfor a broad set of interactive elements when enabled andcursor: not-allowedwhen disabled, detecting disabled state via:disabled,aria-disabled="true", anddata-disabledattributes. (≤50 words)Changes
Global cursor rules
packages/ui/src/styles/globals.css[role=...]/[data-slot=...]interactive elements.packages/ui/src/styles/globals.csscursor: pointerfor those selectors when not disabled (negating:disabled,aria-disabled="true", anddata-disabled).packages/ui/src/styles/globals.csscursor: not-allowedwhen:disabled,aria-disabled="true", ordata-disabledindicate disabled state.packages/ui/src/styles/globals.css@layer baseblock to ensure global base-level cursor behavior.Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands and usage tips.