From 0df45687f2f0862d20b339eaa5bb2b24561224c7 Mon Sep 17 00:00:00 2001 From: imaustink Date: Mon, 1 May 2017 11:46:11 -0700 Subject: [PATCH] Fixes bug scrolling to the top in IOS #224 --- static/mobile.less | 27 ++++++++++++++++++--------- static/sidebar.less | 7 +++---- static/variables.less | 2 +- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/static/mobile.less b/static/mobile.less index 30a83907..466ae2a3 100644 --- a/static/mobile.less +++ b/static/mobile.less @@ -17,24 +17,33 @@ label[for="nav-trigger"] { font-weight: 700; .border-radius; z-index: 99; - transition: background .25s; + transition: background @transition-speed; } label:hover{ background: @border-color; } .nav-trigger:checked + label{ - left: @sidebar-width + @gutter*2; + left: @sidebar-width + @gutter*2; + transition: left @transition-speed*2; } .nav-trigger ~ #everything #right { width: 100%; } .nav-trigger:checked ~ #everything #right { - flex-shrink: 0; - width: auto; - position: fixed; - left: @sidebar-width; - overflow-x: hidden; - z-index: 50; + @media screen and (max-width: @breakpoint){ + flex-shrink: 0; + width: auto; + position: fixed; + left: @sidebar-width; + overflow-x: hidden; + z-index: 50; + } +} +.nav-trigger:not(:checked) ~ #everything #left { + @media screen and (max-width: @breakpoint){ + visibility: hidden; + transition: visibility @transition-speed; + } } .nav-trigger + label { .transition-left @@ -52,4 +61,4 @@ label:hover{ display: none; } } -} +} \ No newline at end of file diff --git a/static/sidebar.less b/static/sidebar.less index d55c7ec7..61c32fa5 100644 --- a/static/sidebar.less +++ b/static/sidebar.less @@ -1,4 +1,3 @@ - .search-bar { display:none; background: @code-color; @@ -10,8 +9,8 @@ color: white; font-weight: 300; } - @media screen and (min-width: @breakpoint) { - display: block; + @media screen and (min-width: @breakpoint) { + display: block; } } @@ -137,4 +136,4 @@ img.social-icon-small{ } } } -} +} \ No newline at end of file diff --git a/static/variables.less b/static/variables.less index 050fcae3..a55d1f1f 100644 --- a/static/variables.less +++ b/static/variables.less @@ -14,7 +14,7 @@ @gutter: 15px; @breakpoint: 1000px; @sidebar-width: 250px; +@transition-speed: .25s; /*----- TYPE -----*/ @font-weight-heading: 500; -