From 13a26670bbf8265ce235a37f642c05f17a2ea569 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 2 Oct 2014 11:45:47 -0600 Subject: [PATCH] fix(sidenav): always leave >=56px of room, no matter the screensize Closes #346 --- src/components/sidenav/_sidenav.scss | 8 +++++++- src/core/style/theme/_variables.scss | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/sidenav/_sidenav.scss b/src/components/sidenav/_sidenav.scss index e06fe720b09..2a9a5d9f640 100644 --- a/src/components/sidenav/_sidenav.scss +++ b/src/components/sidenav/_sidenav.scss @@ -1,7 +1,7 @@ material-sidenav { position: absolute; - width: 304px; + width: $sidenav-default-width; bottom: 0; background-color: white; @@ -56,3 +56,9 @@ material-sidenav { } } } + +@media (max-width: $sidenav-default-width + 2 * $sidenav-min-room) { + material-sidenav { + max-width: 75%; + } +} diff --git a/src/core/style/theme/_variables.scss b/src/core/style/theme/_variables.scss index e33cb622680..4606d653827 100644 --- a/src/core/style/theme/_variables.scss +++ b/src/core/style/theme/_variables.scss @@ -97,6 +97,8 @@ $toolbar-indent-margin: 64px; // Side nav variables $sidenav-shadow: 0px 0px 5px rgba(0,0,0,0.4); +$sidenav-default-width: 304px; +$sidenav-min-room: 56px; // Whiteframes