Ensure outline-hidden behaves like outline-none in non-forced-colors mode (#16943)

Part-of #16926

I noticed that `outline-hidden` would not set `--tw-outline-style`
(contrary to `outline-none`), thus stacking it with other outline
classes won't work as expected: https://play.tailwindcss.com/Y0lPGgekYh
This commit is contained in:
Philipp Spiess 2025-03-04 16:36:28 +01:00 committed by GitHub
parent a98ebacc64
commit b0aa20c30e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Ensure `not-*` does not remove `:is(…)` from variants ([#16825](https://github.com/tailwindlabs/tailwindcss/pull/16825))
- Ensure `@keyframes` are correctly emitted when using a prefixed setup ([#16850](https://github.com/tailwindlabs/tailwindcss/pull/16850))
- Ensure `outline-hidden` behaves like `outline-none` in non-`forced-colors` mode ([#](https://github.com/tailwindlabs/tailwindcss/pull/))
## [4.0.9] - 2025-02-25

View File

@ -14623,6 +14623,7 @@ test('outline', async () => {
}
.outline-hidden {
--tw-outline-style: none;
outline-style: none;
}

View File

@ -3901,6 +3901,7 @@ export function createUtilities(theme: Theme) {
utilities.static('outline-hidden', () => {
return [
decl('--tw-outline-style', 'none'),
decl('outline-style', 'none'),
atRule('@media', '(forced-colors: active)', [
decl('outline', '2px solid transparent'),