improve checked state in forced-colors mode; fixes #1114

pull/1186/head
Cory LaViska 2023-02-06 18:00:39 -05:00
rodzic a539058253
commit df967b7e84
2 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -18,6 +18,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
- Fixed a bug in form controls that erroneously prevented validation states from being set when `novalidate` was used on the containing form [#1164](https://github.com/shoelace-style/shoelace/issues/1164)
- Improved the behavior of `<sl-dropdown>` in Safari so keyboard interaction works the same as in other browsers [#1177](https://github.com/shoelace-style/shoelace/issues/1177)
- Improved the [icons](/components/icon) page so it's not as sluggish in Safari [#1122](https://github.com/shoelace-style/shoelace/issues/1122)
- Improved the accessibility of `<sl-switch>` when used in forced-colors / Windows High Contrast mode [#1114](https://github.com/shoelace-style/shoelace/issues/1114)
## 2.0.0

Wyświetl plik

@ -154,4 +154,11 @@ export default css`
content: var(--sl-input-required-content);
margin-inline-start: var(--sl-input-required-content-offset);
}
@media (forced-colors: active) {
.switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb,
.switch--checked .switch__control .switch__thumb {
background-color: ButtonText;
}
}
`;