tailwindcss/packages
Philipp Spiess e938c58778
Ensure not-* does not remove :is(…) (#16825)
Resolves #16821

This PR removes a special case in the `not-*` variant compound that
removed `:is(…)` if it was the only part of the inversed selector list.
While in-theory this makes sense, `:is(…)` accepts a _forgiving_
selector list where as `:not(…)` does not. See the [last point
here](https://developer.mozilla.org/en-US/docs/Web/CSS/:not#description).

This is an issue specifically in combinations with variants that have
selectors that are not supported by all browsers yet, for example
`:open`.

It seems to be the most expected to simply keep the `:is(…)` here in any
case.

## Test plan
- Ensured the repro form #16821 now also works in browsers that do not
support `:open` (Safari and Firefox at the time of writing this):
<img width="484" alt="Screenshot 2025-02-26 at 15 36 22"
src="https://github.com/user-attachments/assets/f3391693-895b-4e44-8566-95e2960ec4e3"
/>
2025-02-26 18:03:11 +01:00
..
@tailwindcss-browser Prepare v4.0.9 release (#16804) 2025-02-25 17:33:28 +01:00
@tailwindcss-cli Prepare v4.0.9 release (#16804) 2025-02-25 17:33:28 +01:00
@tailwindcss-node Prepare v4.0.9 release (#16804) 2025-02-25 17:33:28 +01:00
@tailwindcss-postcss Prepare v4.0.9 release (#16804) 2025-02-25 17:33:28 +01:00
@tailwindcss-standalone Prepare v4.0.9 release (#16804) 2025-02-25 17:33:28 +01:00
@tailwindcss-upgrade Prepare v4.0.9 release (#16804) 2025-02-25 17:33:28 +01:00
@tailwindcss-vite Prepare v4.0.9 release (#16804) 2025-02-25 17:33:28 +01:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Ensure not-* does not remove :is(…) (#16825) 2025-02-26 18:03:11 +01:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00