tailwindcss/packages
Philipp Spiess 7d51e38d8c
Fix plugins with nested rules refering to the utility name (#16539)
Closes https://github.com/tailwindlabs/tailwindcss-typography/issues/383

This PR fixes an issue that happened when JavaScript plugins create a
nested rule that references to the utility name. The previous behavior
looked like this:


![image](https://github.com/user-attachments/assets/93ff869d-c95b-49d0-879c-7c20a852fa09)

I was able to come up with an approach that can be fixed entirely in the
compat layer by leveraging the `raw` field on the candidate.

## Test plan

- Added unit tests
- Verified with the reproduction from
https://github.com/tailwindlabs/tailwindcss-typography/issues/383:
      
<img width="1458" alt="Screenshot 2025-02-14 at 13 21 22"
src="https://github.com/user-attachments/assets/50544abc-e98f-48cd-b78c-ad7697387dd8"
/>
2025-02-14 18:14:14 +01:00
..
@tailwindcss-browser Update h3 1.13.1 → 1.15.0 (minor) (#16515) 2025-02-14 11:44:43 +01:00
@tailwindcss-cli Update enhanced-resolve 5.18.0 → 5.18.1 (patch) (#16439) 2025-02-11 18:02:29 +01:00
@tailwindcss-node Update enhanced-resolve 5.18.0 → 5.18.1 (patch) (#16439) 2025-02-11 18:02:29 +01:00
@tailwindcss-postcss Prepare v4.0.6 (#16407) 2025-02-10 14:09:00 +01:00
@tailwindcss-standalone Update @types/bun 1.1.16 → 1.2.2 (minor) (#16444) 2025-02-12 12:17:07 +01:00
@tailwindcss-upgrade Upgrade: Handle darkMode value with block syntax (#16507) 2025-02-14 16:48:52 +01:00
@tailwindcss-vite Prepare v4.0.6 (#16407) 2025-02-10 14:09:00 +01:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Fix plugins with nested rules refering to the utility name (#16539) 2025-02-14 18:14:14 +01:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00