From d679f60cd97c9cfdd24eeec1e811cbce506afc33 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 10 Nov 2023 14:01:12 -0500 Subject: [PATCH 1/2] Switch control appearance in `forced-colors` mode --- src/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/index.js b/src/index.js index 04a3992..dd2953f 100644 --- a/src/index.js +++ b/src/index.js @@ -251,6 +251,10 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) { 'background-image': `url("${svgToDataUri( `` )}")`, + + '@media (forced-colors: active) ': { + appearance: 'auto', + }, }, }, { @@ -260,6 +264,10 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) { 'background-image': `url("${svgToDataUri( `` )}")`, + + '@media (forced-colors: active) ': { + appearance: 'auto', + }, }, }, { @@ -292,6 +300,10 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) { 'background-size': `100% 100%`, 'background-position': `center`, 'background-repeat': `no-repeat`, + + '@media (forced-colors: active) ': { + appearance: 'auto', + }, }, }, { From 8cd38a13eecc793c4fd417cf8b11e3a7fac4e8c7 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 10 Nov 2023 14:22:56 -0500 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d70f9a0..040a313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- Nothing yet! +### Fixed + +- Use normal `checkbox` and `radio` appearance in `forced-colors` mode ([#152](https://github.com/tailwindlabs/tailwindcss-forms/pull/152)) ## [0.5.6] - 2023-08-28