From c8bfe4883012d864f0dc3dc7d7cc87a77a50312a Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Mon, 25 Sep 2017 10:34:15 -0400 Subject: [PATCH] Fixed sidebar visibility bug Add `visibility: hidden` to `.sidebar` and toggle it to `visible` when sidebar is in view. Keeps it from showing up when scrolling past the browser's viewport in Safari as well. Fixes #31 --- CHANGELOG.md | 3 ++- _sass/basically-basic/_sidebar.scss | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cd2299..44a4169 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [1.1.2] - 2017-09-14 ### Fixed -- `/_sass/_print.scss` to reduce blank pages when printing in Chrome. [#29](https://github.com/mmistakes/jekyll-theme-basically-basic/issues/29) +- Adjusted `/_sass/_print.scss` to reduce blank pages when printing in Chrome. [#29](https://github.com/mmistakes/jekyll-theme-basically-basic/issues/29) +- Fixed sidebar visibility bug in Firefox and Safari by adding toggling `visibility: hidden`. [#31](https://github.com/mmistakes/jekyll-theme-basically-basic/issues/31) ## [1.1.1] - 2017-09-06 ### Changed diff --git a/_sass/basically-basic/_sidebar.scss b/_sass/basically-basic/_sidebar.scss index f368d42..5128e35 100644 --- a/_sass/basically-basic/_sidebar.scss +++ b/_sass/basically-basic/_sidebar.scss @@ -10,11 +10,20 @@ max-width: $sidebar-width; height: 100%; z-index: 50; + visibility: hidden; + -webkit-transition: visibility 0s 0.3s; + transition: visibility 0s 0.3s; @include breakpoint($large) { max-width: (1.5 * $sidebar-width); } + &.is--visible { + visibility: visible; + -webkit-transition: visibility 0s 0s; + transition: visibility 0s 0s; + } + li { transform: translateX(-1rem); transition: all 0.5s;