Restore pointer cursor on buttons (Tailwind v4 Preflight reset)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-16 15:35:46 +07:00
parent b43924f527
commit 03526ff3b9
+21
View File
@@ -1,3 +1,24 @@
@import 'tailwindcss'; @import 'tailwindcss';
@custom-variant dark (&:where(.dark, .dark *)); @custom-variant dark (&:where(.dark, .dark *));
/* Tailwind v4's Preflight removes cursor:pointer from buttons — restore the expected UX. */
@layer base {
button:not(:disabled),
[role='button']:not(:disabled),
summary,
label[for],
select:not(:disabled),
input[type='submit']:not(:disabled),
input[type='reset']:not(:disabled),
input[type='button']:not(:disabled),
input[type='checkbox']:not(:disabled),
input[type='radio']:not(:disabled) {
cursor: pointer;
}
button:disabled,
[role='button'][aria-disabled='true'] {
cursor: not-allowed;
}
}