Skip to content

Commit

Permalink
define focus ring style in buttn.css
Browse files Browse the repository at this point in the history
  • Loading branch information
peetucket committed Sep 3, 2024
1 parent 979aa30 commit 5808cf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion styles/accessibility.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.nav-link:focus-visible, :focus-visible, .btn:focus-visible {
.nav-link:focus-visible, /* we need the class to override bootstrap's defaults */
:focus-visible {
outline: 2px solid white; /* Outer color */
box-shadow: 0 0 0 4px var(--stanford-black); /* Inner color */
}
6 changes: 6 additions & 0 deletions styles/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
--bs-btn-disabled-opacity: 1;
--bs-btn-padding-y: 0.25rem;
--bs-btn-padding-x: 0.5rem;
--bs-btn-focus-box-shadow: white;
}

.btn:hover {
Expand Down Expand Up @@ -55,3 +56,8 @@
--bs-btn-active-bg: white;
--bs-btn-bg: white;
}

.btn:focus-visible {
outline: 2px solid var(--bs-btn-focus-box-shadow); /* Outer color */
box-shadow: 0 0 0 4px var(--stanford-black); /* Inner color */
}

0 comments on commit 5808cf3

Please sign in to comment.