style: soften the focus ring on programmatically focused headings
This commit is contained in:
BIN
docs/redesign/round6/heading-focus-after-1440.webp
Normal file
BIN
docs/redesign/round6/heading-focus-after-1440.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@@ -51,6 +51,19 @@ summary:focus-visible,
|
|||||||
outline-offset: 3px;
|
outline-offset: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Destination headings take programmatic focus after a keyboard or scripted
|
||||||
|
jump. A thinner, softer ring still marks the landing point (about 5:1
|
||||||
|
against the night background) without shouting like a control's focus. */
|
||||||
|
:is(h1, h2)[tabindex]:focus-visible {
|
||||||
|
outline: 2px solid color-mix(in srgb, var(--focus) 60%, transparent);
|
||||||
|
outline-offset: 6px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (forced-colors: active) {
|
||||||
|
:is(h1, h2)[tabindex]:focus-visible { outline-color: Highlight; }
|
||||||
|
}
|
||||||
|
|
||||||
.portfolio-main:focus-visible {
|
.portfolio-main:focus-visible {
|
||||||
/* The localized cue lives outside the reading mask. Keep the main landmark
|
/* The localized cue lives outside the reading mask. Keep the main landmark
|
||||||
focusable for native skip links without outlining the entire document. */
|
focusable for native skip links without outlining the entire document. */
|
||||||
|
|||||||
Reference in New Issue
Block a user