Skip to content

Commit 5cb0c3d

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 79e92de commit 5cb0c3d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

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

2627
## [3.3.6] - 2023-12-04
2728

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)