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

Add focus ring/border in Windows High Contrast mode #1729

Merged
merged 20 commits into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from 10 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: 4 additions & 0 deletions assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,7 @@ button.shopify-payment-button__button--unbranded {
-webkit-appearance: none;
appearance: none;
background-color: rgba(var(--color-button), var(--alpha-button-background));
@media (forced-colors: active) { border: transparent solid 1px; }
}

.button:before,
Expand Down Expand Up @@ -1372,6 +1373,7 @@ button.shopify-payment-button__button--unbranded {
box-shadow: 0 0 0 0.3rem rgb(var(--color-background)),
0 0 0 0.5rem rgba(var(--color-foreground), 0.5),
0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3);
@media (forced-colors: active) { outline: solid transparent 1px; }
}

.button:focus:not(:focus-visible):not(.focused),
Expand Down Expand Up @@ -1730,11 +1732,13 @@ details[open] > .share-button__fallback {
box-shadow: 0 0 0 calc(0.1rem + var(--inputs-border-width)) rgba(var(--color-foreground));
outline: 0;
border-radius: var(--inputs-radius);
@media (forced-colors: active) { outline: transparent solid 1px; }
}

.localization-form__select:focus {
outline: 0;
box-shadow: none;
@media (forced-colors: active) { outline: transparent solid 1px; }
}

.text-area,
pizzaz93 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
1 change: 1 addition & 0 deletions assets/component-deferred-media.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
outline: none;
box-shadow: 0 0 0 var(--media-border-width) rgba(var(--color-foreground), var(--media-border-opacity)), 0 0 0 calc(var(--media-border-width) + 0.3rem) rgb(var(--color-background)),0 0 0 calc(var(--media-border-width) + 0.5rem) rgba(var(--color-foreground),.5);
border-radius: calc(var(--media-radius) - var(--media-border-width));
@media (forced-colors: active) { outline: transparent solid 1px; }
pizzaz93 marked this conversation as resolved.
Show resolved Hide resolved
}

.deferred-media__poster:focus:not(:focus-visible) {
Expand Down
1 change: 1 addition & 0 deletions assets/component-facets.css
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ span.active-facets__button-inner:after {
a.active-facets__button:focus-visible {
outline: none;
box-shadow: none;
@media (forced-colors: active) { outline: transparent solid 1px; }
pizzaz93 marked this conversation as resolved.
Show resolved Hide resolved
}

a.active-facets__button.focused,
Expand Down
2 changes: 2 additions & 0 deletions assets/section-main-product.css
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ a.product__text {
.product__media-toggle:focus-visible {
outline: 0;
box-shadow: none;
@media (forced-colors: active) { outline: transparent solid 1px; }
}

.product__media-toggle.focused {
Expand Down Expand Up @@ -1100,6 +1101,7 @@ a.product__text {
.thumbnail.focused {
outline: 0;
box-shadow: 0 0 0 0.3rem rgb(var(--color-background)),0 0 0rem 0.5rem rgba(var(--color-foreground), 0.5);
@media (forced-colors: active) { outline: transparent solid 1px; }
pizzaz93 marked this conversation as resolved.
Show resolved Hide resolved
}

.thumbnail[aria-current]:focus:not(:focus-visible) {
Expand Down