Skip to content

Commit cd37f63

Browse files
authored
fix: mode toggle not outlined when receiving keyboard focus (mmistakes#1690)
The Tab key focus
1 parent 015d567 commit cd37f63

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

_includes/sidebar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h1 class="site-title">
4444

4545
<div class="sidebar-bottom d-flex flex-wrap align-items-center w-100">
4646
{% unless site.theme_mode %}
47-
<button type="button" class="btn" aria-label="Switch Mode" id="mode-toggle">
47+
<button type="button" class="btn btn-link nav-link" aria-label="Switch Mode" id="mode-toggle">
4848
<i class="fas fa-adjust"></i>
4949
</button>
5050

_sass/addon/commons.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,10 @@ $btn-mb: 0.5rem;
823823
display: flex;
824824
align-items: center;
825825
justify-content: center;
826-
box-shadow: var(--sidebar-border-color) 0 0 0 1px;
826+
827+
&:not(:focus-visible) {
828+
box-shadow: var(--sidebar-border-color) 0 0 0 1px;
829+
}
827830

828831
&:hover {
829832
background-color: var(--sidebar-hover-bg);
@@ -845,9 +848,6 @@ $btn-mb: 0.5rem;
845848
}
846849

847850
#mode-toggle {
848-
padding: 0;
849-
border: 0;
850-
851851
@extend %button;
852852
@extend %sidebar-links;
853853
@extend %sidebar-link-hover;

0 commit comments

Comments
 (0)