tailwindcss/packages
Robin Malfait 2c1ef9eb25
Use --placeholder-color instead of --background-color for placeholder-* utilities (#19843)
This PR fixes an issue where `placeholder-*` utilities were reading
values from `--background-color` instead of `--placeholder-color`. In
Tailwind CSS v3, we read from `placeholderColor` which is why we should
use `--placeholder-color` here as well.


f38be227df/src/corePlugins.js (L2317)

That said, this is technically a breaking change in case somebody relies
on `--background-color` for `placeholder` values. But since this is text
related, and most people will rely on the default `--color` values
instead, I think it's safe to change this as-is.

In the unlikely event that somebody _does_ rely on this, then we have 2
options:

1. Guide them to make use of `--placeholder-color` instead (preferred
solution)
2. Re-add `--background-color` after the `--placeholder-color` (band-aid
solution, but might be worth it who knows)

Fixes: #19838

## Test plan

1. Existing tests still pass
2. Verified in the Tailwind CSS v3 codebase that we did read from
`placeholderColor` which in turn reads from `color` by default. Which is
equivalent to `--placeholder-color` and `--color` in Tailwind CSS v4.
2026-03-23 15:57:20 +01:00
..
@tailwindcss-browser 4.2.2 (#19821) 2026-03-18 11:44:08 -04:00
@tailwindcss-cli 4.2.2 (#19821) 2026-03-18 11:44:08 -04:00
@tailwindcss-node 4.2.2 (#19821) 2026-03-18 11:44:08 -04:00
@tailwindcss-postcss 4.2.2 (#19821) 2026-03-18 11:44:08 -04:00
@tailwindcss-standalone 4.2.2 (#19821) 2026-03-18 11:44:08 -04:00
@tailwindcss-upgrade 4.2.2 (#19821) 2026-03-18 11:44:08 -04:00
@tailwindcss-vite fix(vite): resolve tsconfig paths in CSS and JS resolvers (#19803) 2026-03-20 15:19:18 +00:00
@tailwindcss-webpack Fix webpack loader cache key for resource queries (#19723) 2026-03-20 16:34:11 +00:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Use --placeholder-color instead of --background-color for placeholder-* utilities (#19843) 2026-03-23 15:57:20 +01:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00