Skip to content

Commit b0aa20c

Browse files
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
1 parent a98ebac commit b0aa20c

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020

2121
- Ensure `not-*` does not remove `:is(…)` from variants ([#16825](https://github.com/tailwindlabs/tailwindcss/pull/16825))
2222
- Ensure `@keyframes` are correctly emitted when using a prefixed setup ([#16850](https://github.com/tailwindlabs/tailwindcss/pull/16850))
23+
- Ensure `outline-hidden` behaves like `outline-none` in non-`forced-colors` mode ([#](https://github.com/tailwindlabs/tailwindcss/pull/))
2324

2425
## [4.0.9] - 2025-02-25
2526

packages/tailwindcss/src/utilities.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14623,6 +14623,7 @@ test('outline', async () => {
1462314623
}
1462414624
1462514625
.outline-hidden {
14626+
--tw-outline-style: none;
1462614627
outline-style: none;
1462714628
}
1462814629

packages/tailwindcss/src/utilities.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3901,6 +3901,7 @@ export function createUtilities(theme: Theme) {
39013901

39023902
utilities.static('outline-hidden', () => {
39033903
return [
3904+
decl('--tw-outline-style', 'none'),
39043905
decl('outline-style', 'none'),
39053906
atRule('@media', '(forced-colors: active)', [
39063907
decl('outline', '2px solid transparent'),

0 commit comments

Comments
 (0)