Skip to content

Commit f1aa847

Browse files
committed
Improve top navbar and sidebar on mobile
1 parent 9a6114c commit f1aa847

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

src/css/custom.css

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,33 @@ html[data-theme='dark'] {
120120
color: var(--zinc-300) !important;
121121
}
122122

123+
@media (max-width: 996px) {
124+
.navbar__toggle {
125+
margin-right: 1rem;
126+
}
127+
128+
.navbar__toggle svg {
129+
width: 24px;
130+
height: 24px;
131+
}
132+
133+
.clean-btn.navbar-sidebar__close svg {
134+
width: 14px;
135+
height: 14px;
136+
}
137+
138+
.clean-btn.navbar-sidebar__close svg path {
139+
stroke-width: 1.5 !important;
140+
}
141+
142+
.navbar-sidebar__back {
143+
margin: 0.5rem 0 0 -0.5rem;
144+
background-color: transparent;
145+
padding: var(--ifm-menu-link-padding-vertical) calc(var(--ifm-menu-link-padding-horizontal) + 0.5rem);
146+
font-weight: 600;
147+
}
148+
}
149+
123150
/* Sidebar */
124151
.menu__list .menu__list {
125152
position: relative;
@@ -183,6 +210,27 @@ html[data-theme='dark'] {
183210
background: var(--ifm-menu-link-sublist-icon) 50% / 1.3rem 1.3rem;
184211
}
185212

213+
@media (max-width: 996px) {
214+
.tocCollapsible_ETCw.tocMobile_ITEo {
215+
background-color: var(--white);
216+
border: 1px solid var(--zinc-300);
217+
}
218+
219+
.clean-btn.tocCollapsibleButton_TO0P {
220+
padding: 0.8rem 1rem;
221+
font-size: 0.9rem;
222+
}
223+
224+
.tocCollapsibleContent_vkbj .table-of-contents li {
225+
margin: 0.6rem 1rem;
226+
}
227+
228+
.clean-btn.tocCollapsibleButton_TO0P::after {
229+
width: 10px;
230+
height: 10px;
231+
}
232+
}
233+
186234
/* Main canvas */
187235
.breadcrumbs__link,
188236
.table-of-contents__link {

0 commit comments

Comments
 (0)