Skip to content

Commit 6364954

Browse files
authored
Allow SubNav links' focus color to be set (#985)
* set focus styles and allow them to be overriden * update focus implementation * add changeset * github-actions[bot] Regenerated snapshots * use token * update changeset --------- Co-authored-by: joshfarrant <[email protected]>
1 parent 82490fa commit 6364954

5 files changed

+13
-0
lines changed

.changeset/fair-ladybugs-bathe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react-brand': patch
3+
---
4+
5+
The focus outline color of `SubNav` links is now set to `var(--brand-color-focus);`

packages/react/src/SubNav/SubNav.module.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,14 @@
459459
justify-content: flex-end;
460460
}
461461

462+
.SubNav__link:focus-visible,
463+
.SubNav__heading:focus-visible,
464+
.SubNav__sub-menu-toggle:focus-visible,
465+
.SubNav__overlay-toggle:focus-visible {
466+
outline: var(--brand-borderWidth-thick) solid var(--brand-color-focus);
467+
outline-offset: var(--base-size-2);
468+
}
469+
462470
@media screen and (min-width: 48rem) {
463471
.SubNav {
464472
padding: var(--base-size-16) var(--base-size-24);

0 commit comments

Comments
 (0)