web: use outline for focus ring instead of box-shadow

- prevents conflicts with existing box-shadow(s) on basically all components
- removes the need for data-focus-ring-hidden or any other weird workarounds
This commit is contained in:
wukko 2025-04-27 20:35:50 +06:00
parent e3a60d8775
commit 0e1750e215
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2
3 changed files with 11 additions and 11 deletions

View File

@ -14,7 +14,8 @@
--purple: #5857d4;
--orange: #f19a38;
--focus-ring: 0 0 0 2px var(--blue) inset;
--focus-ring: solid 2px var(--blue);
--focus-ring-offset: -2px;
--button: #f4f4f4;
--button-hover: #ededed;
@ -240,13 +241,14 @@ button, .button {
}
:focus-visible {
box-shadow: var(--focus-ring) !important;
outline: none;
z-index: 1;
}
[data-focus-ring-hidden]:focus-visible {
box-shadow: none !important;
button:focus-visible,
a:focus-visible {
outline: var(--focus-ring);
outline-offset: var(--focus-ring-offset);
z-index: 1;
}
.button.elevated {

View File

@ -72,7 +72,8 @@
width: 100%;
height: 100%;
position: absolute;
box-shadow: var(--focus-ring);
outline: var(--focus-ring);
outline-offset: var(--focus-ring-offset);
border-radius: inherit;
}

View File

@ -162,12 +162,9 @@
box-shadow: 0 0 0 2px rgba(255, 255, 255, var(--donate-border-opacity));
}
#share-qr:focus-visible {
box-shadow: none !important;
}
#share-qr:focus-visible :global(svg) {
box-shadow: 0 0 0 2px var(--blue);
outline: var(--focus-ring);
outline-offset: var(--focus-ring-offset);
}
#action-buttons {