From 7d4bf91a35a8faa1b2e409e5a059ba152a30df7e Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Wed, 20 Dec 2017 21:45:06 +0000 Subject: Small fixes --- src/js/controls.js | 2 +- src/sass/base.scss | 4 ++-- src/sass/utils/hidden.scss | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/js/controls.js b/src/js/controls.js index 8138367e..22ca30ad 100644 --- a/src/js/controls.js +++ b/src/js/controls.js @@ -400,7 +400,7 @@ const controls = { if (utils.is.event(event)) { percent = 100 / clientRect.width * (event.pageX - clientRect.left); } else if (utils.hasClass(this.elements.display.seekTooltip, visible)) { - percent = this.elements.display.seekTooltip.style.left.replace('%', ''); + percent = parseFloat(this.elements.display.seekTooltip.style.left, 10); } else { return; } diff --git a/src/sass/base.scss b/src/sass/base.scss index 1b454151..307da36e 100644 --- a/src/sass/base.scss +++ b/src/sass/base.scss @@ -33,7 +33,7 @@ // border-box everything // http://paulirish.com/2012/box-sizing-border-box-ftw/ -@if $plyr-border-box == true { +@if $plyr-border-box { .plyr--full-ui { box-sizing: border-box; @@ -46,7 +46,7 @@ } // Fix 300ms delay -@if $plyr-touch-action == true { +@if $plyr-touch-action { .plyr--full-ui { a, button, diff --git a/src/sass/utils/hidden.scss b/src/sass/utils/hidden.scss index 4deecf52..f3b46147 100644 --- a/src/sass/utils/hidden.scss +++ b/src/sass/utils/hidden.scss @@ -17,15 +17,13 @@ overflow: hidden; // !important is not always needed - @if $plyr-sr-only-important == true { + @if $plyr-sr-only-important { border: 0 !important; height: 1px !important; padding: 0 !important; position: absolute !important; width: 1px !important; - } - - @if $plyr-sr-only-important == false { + } @else { border: 0; height: 1px; padding: 0; -- cgit v1.2.3