Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use normal checkbox and radio appearance in forced-colors mode #152

Merged
merged 2 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
'background-image': `url("${svgToDataUri(
`<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>`
)}")`,

'@media (forced-colors: active) ': {
appearance: 'auto',
},
},
},
{
Expand All @@ -260,6 +264,10 @@ const forms = plugin.withOptions(function (options = { strategy: undefined }) {
'background-image': `url("${svgToDataUri(
`<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>`
)}")`,

'@media (forced-colors: active) ': {
appearance: 'auto',
},
},
},
{
Expand Down Expand Up @@ -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',
},
},
},
{
Expand Down