From 87c9f32cbc7bfb2eb9f9113a8e339e2b376f0b06 Mon Sep 17 00:00:00 2001 From: Alexander Kachkaev Date: Mon, 29 Jul 2024 15:10:15 +0100 Subject: [PATCH] Remove cursor override for `:disabled` buttons (#14061) Related to https://github.com/tailwindlabs/tailwindcss/issues/8961 and https://github.com/tailwindlabs/tailwindcss/pull/8962 Before v4, buttons got this CSS in preflight: https://github.com/tailwindlabs/tailwindcss/blob/9824cb64a03afaa405e184cb31003c8a1efafaa7/src/css/preflight.css#L339-L353 v4 (`next` branch) no longer has `cursor: pointer` in [preflight.css](https://github.com/tailwindlabs/tailwindcss/blob/2fe249963583e436961adc59cf9988af454e3da5/packages/tailwindcss/preflight.css) This PR removes additional CSS for `:disabled` buttons. It was meant to undo an override that is no longer present. --- .../src/__snapshots__/index.test.ts.snap | 4 ---- packages/tailwindcss/preflight.css | 8 -------- 2 files changed, 12 deletions(-) diff --git a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap index 26c587804..ee626aeea 100644 --- a/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap +++ b/packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap @@ -566,10 +566,6 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = ` color: color-mix(in srgb, currentColor 50%, transparent); } - :disabled { - cursor: default; - } - img, svg, video, canvas, audio, iframe, embed, object { vertical-align: middle; display: block; diff --git a/packages/tailwindcss/preflight.css b/packages/tailwindcss/preflight.css index 8138927d8..bf664fc2b 100644 --- a/packages/tailwindcss/preflight.css +++ b/packages/tailwindcss/preflight.css @@ -289,14 +289,6 @@ textarea { color: color-mix(in srgb, currentColor 50%, transparent); /* 2 */ } -/* - Make sure disabled buttons don't get the pointer cursor. -*/ - -:disabled { - cursor: default; -} - /* 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)