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:
parent
903eb5629c
commit
b411d04c8c
5 changed files with 20 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
"
|
||||
`;
|
||||
3
tests/plugins/variants/forcedColorsVariants.test.js
Normal file
3
tests/plugins/variants/forcedColorsVariants.test.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { quickVariantPluginTest } from '../../util/run'
|
||||
|
||||
quickVariantPluginTest('forcedColorsVariants').toMatchSnapshot()
|
||||
Loading…
Add table
Add a link
Reference in a new issue