From 18b677ee0225eb259b1901e8dcb5d3fb836d255a Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sun, 19 Aug 2018 11:54:37 +0200 Subject: Adds a vendor prefix for position sticky Signed-off-by: Michael Weimann --- core/css/apps.scss | 4 ++-- core/css/functions.scss | 11 ++++++++++- core/css/styles.scss | 3 +-- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/css/apps.scss b/core/css/apps.scss index 1446187ad83..1120459230a 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -639,7 +639,7 @@ kbd { min-width: $sidebar-min-width; max-width: $sidebar-max-width; display: block; - position: sticky; + @include position('sticky'); top: $header-height; right:0; overflow-y: auto; @@ -1046,7 +1046,7 @@ $popovericon-size: 16px; /* CONTENT LIST ------------------------------------------------------------ */ .app-content-list { width: 300px; - position: sticky; + @include position('sticky'); top: $header-height; border-right: 1px solid var(--color-border); display: flex; diff --git a/core/css/functions.scss b/core/css/functions.scss index 30075df7f58..0815ba29ab6 100644 --- a/core/css/functions.scss +++ b/core/css/functions.scss @@ -59,4 +59,13 @@ .icon-#{$icon}.icon-white { @include icon-color($icon, $dir, $color-white, $version, $core); } -} \ No newline at end of file +} + +@mixin position($value) { + @if $value == 'sticky' { + position: -webkit-sticky; // Safari support + position: sticky; + } @else { + position: $value; + } +} diff --git a/core/css/styles.scss b/core/css/styles.scss index 80534e22227..6a72df0e177 100644 --- a/core/css/styles.scss +++ b/core/css/styles.scss @@ -163,8 +163,7 @@ body { #controls { box-sizing: border-box; - position: -webkit-sticky; - position: sticky; + @include position('sticky'); height: 44px; padding: 0; margin: 0; -- cgit v1.2.3