Add forced-colors variant (#11694)

* Add forced-colors variant

Also add a contrast-custom variant to match custom contrast preferences

* use `toMatchSnapshot` instead of `toMatchFormattedCss`

More info: https://github.com/tailwindlabs/tailwindcss/pull/12170

* remove `contrast-custom` variant

* move `forcedColorsVariants` next to `prefersContrastVariants`

* update changelog

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This commit is contained in:
Luke Warlow 2023-11-02 19:28:50 +00:00 • committed by GitHub
parent 903eb5629c
commit b411d04c8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should test the 'forcedColorsVariants' plugin 1`] = `
"
@media (forced-colors: active) {
.forced-colors\\:flex {
display: flex;
}
}
"
`;

View file

@ -0,0 +1,3 @@
import { quickVariantPluginTest } from '../../util/run'
quickVariantPluginTest('forcedColorsVariants').toMatchSnapshot()