Skip to content

Commit

Permalink
Add forced-color-adjust utilities (#11931)
Browse files Browse the repository at this point in the history
* 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 <malfait.robin@gmail.com>
  • Loading branch information
2 people authored and thecrypticace committed Dec 4, 2023
1 parent 30158c7 commit 8213120
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `size-*` utilities ([#12287](https://github.com/tailwindlabs/tailwindcss/pull/12287))
- Add utilities for CSS subgrid ([#12298](https://github.com/tailwindlabs/tailwindcss/pull/12298))
- Add spacing scale to `min-w-*`, `min-h-*`, and `max-w-*` utilities ([#12300](https://github.com/tailwindlabs/tailwindcss/pull/12300))

- Add `forced-color-adjust` utilities ([#11931](https://github.com/tailwindlabs/tailwindcss/pull/11931))

## [3.3.6] - 2023-12-04

Expand Down
6 changes: 6 additions & 0 deletions src/corePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -2883,4 +2883,10 @@ export let corePlugins = {
content: createUtilityPlugin('content', [
['content', ['--tw-content', ['content', 'var(--tw-content)']]],
]),
forcedColorAdjust: ({ addUtilities }) => {
addUtilities({
'.forced-color-adjust-auto': { 'forced-color-adjust': 'auto' },
'.forced-color-adjust-none': { 'forced-color-adjust': 'none' },
})
},
}

0 comments on commit 8213120

Please sign in to comment.