From 11ad85f39fbd73b9036b2abd9e30c8c73c5a4410 Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Tue, 24 Jul 2018 12:31:57 -0500 Subject: [PATCH] Reduce the margins on header icons on narrow devices --- src/theme/book.css | 6 ++++++ src/theme/stylus/menu.styl | 3 +++ src/theme/stylus/variables.styl | 1 + 3 files changed, 10 insertions(+) diff --git a/src/theme/book.css b/src/theme/book.css index 086bd78f..e98b4415 100644 --- a/src/theme/book.css +++ b/src/theme/book.css @@ -224,6 +224,12 @@ table thead td { -ms-transition: color 0.5s; transition: color 0.5s; } +@media only screen and (max-width: 420px) { + #menu-bar i, + #menu-bar .icon-button { + margin: 0 5px; + } +} #menu-bar #print-button { margin: 0 15px; } diff --git a/src/theme/stylus/menu.styl b/src/theme/stylus/menu.styl index faa55c10..147f8266 100644 --- a/src/theme/stylus/menu.styl +++ b/src/theme/stylus/menu.styl @@ -15,6 +15,9 @@ i, .icon-button { position: relative margin: 0 10px + @media only screen and (max-width: $narrow-device-max-width) { + margin: 0 5px + } z-index: 10 line-height: 50px cursor: pointer diff --git a/src/theme/stylus/variables.styl b/src/theme/stylus/variables.styl index 52497035..6ffbb73b 100644 --- a/src/theme/stylus/variables.styl +++ b/src/theme/stylus/variables.styl @@ -4,3 +4,4 @@ $content-max-width = 750px $content-min-width = 320px $page-plus-sidebar-width = $content-max-width + $sidebar-width + $page-padding * 2 $sidebar-reflow-width = $sidebar-width + $content-min-width +$narrow-device-max-width = 420px