Skip to content

Commit

Permalink
fix: Links must always have focus rects in hcm.
Browse files Browse the repository at this point in the history
  • Loading branch information
sopranopillow committed Dec 6, 2023
1 parent 8a9fadf commit e54d332
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/public-docsite/src/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
// Remove dotted outline added by MWF's main.css
body [contentEditable=true]:focus,
body [tabindex]:focus,
a[href]:not(.c-uhff-link):focus, // Remove link focus outline from all links but the UHF ones
body area[href]:focus,
body button:focus,
body iframe:focus,
Expand All @@ -48,6 +47,13 @@
outline: none;
}

// Remove link focus outline from all links but the UHF ones unless you're in high contrast mode
@media (forced-colors: none) {
a[href]:not(.c-uhff-link):focus {
outline: none;
}
}

// Return the outline on the 'back to top' button
.back-to-top a[href]:focus {
@include focus-border(-2px);
Expand Down

0 comments on commit e54d332

Please sign in to comment.