Skip to content

Commit d8f54d5

Browse files
authored
Fix left-padding of language menu in a foldable sidebar (#2339)
1 parent 1b961c9 commit d8f54d5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

assets/scss/_nav.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
// Adapted from: https://github.com/twbs/bootstrap/blob/main/site/layouts/_default/examples.html
100100
width: 1em;
101101
height: 1em;
102-
vertical-align: -.125em;
102+
vertical-align: -0.125em;
103103
fill: currentcolor;
104104
}
105105
}
@@ -150,7 +150,6 @@
150150
transform: translateY(-50%);
151151
}
152152
}
153-
154153
}
155154
}
156155

@@ -180,7 +179,7 @@
180179
-webkit-font-smoothing: antialiased;
181180
font-family: $td-font-awesome-font-name;
182181
font-weight: 900;
183-
content: "\f0d9";
182+
content: '\f0d9';
184183
padding-left: 0.5em;
185184
padding-right: 0.5em;
186185
}
@@ -205,7 +204,8 @@ nav.foldable-nav {
205204
margin: 0;
206205
}
207206

208-
.ul-1 > li {
207+
.ul-1 > li,
208+
.dropdown {
209209
padding-left: 1.5em;
210210
}
211211

@@ -217,7 +217,7 @@ nav.foldable-nav {
217217
display: block;
218218
}
219219

220-
input[type="checkbox"] {
220+
input[type='checkbox'] {
221221
display: none;
222222
}
223223

@@ -235,7 +235,7 @@ nav.foldable-nav {
235235
-webkit-font-smoothing: antialiased;
236236
font-family: $td-font-awesome-font-name;
237237
font-weight: 900;
238-
content: "\f0da";
238+
content: '\f0da';
239239
position: absolute;
240240
left: 0.1em;
241241
padding-left: 0.4em;

docsy.dev/hugo.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ params:
8383
showLightDarkModeMenu: true
8484
sidebar_lang_menu: true # Set to true to show the language menu in the sidebar
8585
sidebar_menu_compact: true
86+
sidebar_menu_foldable: true
8687
sidebar_search_disable: false
8788
# sidebar_root_enabled: true
8889
feedback:

layouts/_partials/sidebar-tree.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
{{- if .Site.Params.ui.sidebar_root_enabled }} data-sidebar-root="{{ $sidebarRootID }}"{{ end -}}
4343
>
4444
{{ if and .Site.Params.ui.sidebar_lang_menu (gt (len .Site.Home.Translations) 0) -}}
45-
<div class="td-sidebar-nav__section nav-item dropdown d-block d-lg-none">
45+
<div class="td-sidebar-nav__section nav-item d-block d-lg-none">
4646
{{ partial "navbar-lang-selector.html" . }}
4747
</div>
4848
{{ end -}}

0 commit comments

Comments
 (0)