Skip to content

Commit 8213120

Browse files
lukewarlowRobinMalfait
authored andcommitted
Add forced-color-adjust utilities (#11931)
* Add forced-colors-adjust utilities * Update forcedColorsAdjust.test.js * use `toMatchSnapshot` instead of `toMatchFormattedCss` More info: #12170 * rename `forced-colors-adjust` -> `forced-color-adjust` Dropped the `s` in `colors`. * update changelog * fix typo * use full `forced-color-adjust-auto` and `forced-color-adjust-none` names --------- Co-authored-by: Robin Malfait <[email protected]>
1 parent 30158c7 commit 8213120

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- Add `size-*` utilities ([#12287](https://github.com/tailwindlabs/tailwindcss/pull/12287))
1919
- Add utilities for CSS subgrid ([#12298](https://github.com/tailwindlabs/tailwindcss/pull/12298))
2020
- Add spacing scale to `min-w-*`, `min-h-*`, and `max-w-*` utilities ([#12300](https://github.com/tailwindlabs/tailwindcss/pull/12300))
21-
21+
- Add `forced-color-adjust` utilities ([#11931](https://github.com/tailwindlabs/tailwindcss/pull/11931))
2222

2323
## [3.3.6] - 2023-12-04
2424

src/corePlugins.js

+6
Original file line numberDiff line numberDiff line change
@@ -2883,4 +2883,10 @@ export let corePlugins = {
28832883
content: createUtilityPlugin('content', [
28842884
['content', ['--tw-content', ['content', 'var(--tw-content)']]],
28852885
]),
2886+
forcedColorAdjust: ({ addUtilities }) => {
2887+
addUtilities({
2888+
'.forced-color-adjust-auto': { 'forced-color-adjust': 'auto' },
2889+
'.forced-color-adjust-none': { 'forced-color-adjust': 'none' },
2890+
})
2891+
},
28862892
}

0 commit comments

Comments
 (0)