Skip to content

Commit e7afb33

Browse files
committed
Reduce the margins on header icons on narrow devices
1 parent b4e15e5 commit e7afb33

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

src/theme/book.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ table thead td {
217217
#menu-bar i,
218218
#menu-bar .icon-button {
219219
position: relative;
220-
margin: 0 10px;
220+
margin: 0 8px;
221221
z-index: 10;
222222
line-height: 50px;
223223
cursor: pointer;
@@ -227,6 +227,12 @@ table thead td {
227227
-ms-transition: color 0.5s;
228228
transition: color 0.5s;
229229
}
230+
@media only screen and (max-width: 420px) {
231+
#menu-bar i,
232+
#menu-bar .icon-button {
233+
margin: 0 5px;
234+
}
235+
}
230236
#menu-bar #print-button {
231237
margin: 0 15px;
232238
}
@@ -237,6 +243,9 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
237243
-ms-transform: translateY(-60px);
238244
transform: translateY(-60px);
239245
}
246+
.left-buttons {
247+
margin: 0 5px;
248+
}
240249
.no-js .left-buttons {
241250
display: none;
242251
}

src/theme/stylus/menu.styl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414

1515
i, .icon-button {
1616
position: relative
17-
margin: 0 10px
17+
margin: 0 8px
18+
@media only screen and (max-width: $narrow-device-max-width) {
19+
margin: 0 5px
20+
}
1821
z-index: 10
1922
line-height: 50px
2023
cursor: pointer
@@ -30,8 +33,9 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
3033
transform: translateY(-60px);
3134
}
3235

33-
.no-js .left-buttons {
34-
display: none
36+
.left-buttons {
37+
.no-js & { display: none }
38+
margin: 0 5px
3539
}
3640

3741
.menu-title {

src/theme/stylus/variables.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ $content-max-width = 750px
44
$content-min-width = 320px
55
$page-plus-sidebar-width = $content-max-width + $sidebar-width + $page-padding * 2
66
$sidebar-reflow-width = $sidebar-width + $content-min-width
7+
$narrow-device-max-width = 420px

0 commit comments

Comments
 (0)