diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/plyr.js | 2 | ||||
-rw-r--r-- | src/less/base.less | 24 | ||||
-rw-r--r-- | src/less/utilities.less | 21 | ||||
-rw-r--r-- | src/less/variables.less | 5 | ||||
-rw-r--r-- | src/scss/plyr.scss | 43 | ||||
-rw-r--r-- | src/scss/variables.scss | 5 |
6 files changed, 70 insertions, 30 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index b1c3e764..5d914fc3 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1,6 +1,6 @@ // ========================================================================== // Plyr -// plyr.js v1.6.4 +// plyr.js v1.6.5 // https://github.com/selz/plyr // License: The MIT License (MIT) // ========================================================================== diff --git a/src/less/base.less b/src/less/base.less index 5ff866b6..6c384556 100644 --- a/src/less/base.less +++ b/src/less/base.less @@ -8,18 +8,22 @@ min-width: 200px; font-family: Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif; - // border-box everything - // http://paulirish.com/2012/box-sizing-border-box-ftw/ - &, - *, - *::after, - *::before { - box-sizing: border-box; + & when (@plyr-border-box = true) { + // border-box everything + // http://paulirish.com/2012/box-sizing-border-box-ftw/ + &, + *, + *::after, + *::before { + box-sizing: border-box; + } } - // Fix 300ms delay - a, button, input, label { - touch-action: manipulation; + & when (@plyr-touch-action = true) { + // Fix 300ms delay + a, button, input, label { + touch-action: manipulation; + } } // Media elements diff --git a/src/less/utilities.less b/src/less/utilities.less index 518f2a8d..70c7f270 100644 --- a/src/less/utilities.less +++ b/src/less/utilities.less @@ -4,11 +4,22 @@ // Screen reader only elements .plyr__sr-only { - position: absolute !important; clip: rect(1px, 1px, 1px, 1px); - padding: 0 !important; - border: 0 !important; - height: 1px !important; - width: 1px !important; overflow: hidden; + + // !important is not always needed + & when (@plyr-sr-only-important = true) { + position: absolute !important; + padding: 0 !important; + border: 0 !important; + height: 1px !important; + width: 1px !important; + } + & when (@plyr-sr-only-important = false) { + position: absolute; + padding: 0; + border: 0; + height: 1px; + width: 1px; + } }
\ No newline at end of file diff --git a/src/less/variables.less b/src/less/variables.less index 62fab14e..d152ecb7 100644 --- a/src/less/variables.less +++ b/src/less/variables.less @@ -2,6 +2,11 @@ // Variables // ========================================================================== +// Settings +@plyr-border-box: true; +@plyr-touch-action: true; +@plyr-sr-only-important: true; + // Colors @plyr-color-main: #3498db; diff --git a/src/scss/plyr.scss b/src/scss/plyr.scss index fb203a5a..917c0645 100644 --- a/src/scss/plyr.scss +++ b/src/scss/plyr.scss @@ -21,18 +21,22 @@ min-width: 200px; font-family: Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif; - // border-box everything - // http://paulirish.com/2012/box-sizing-border-box-ftw/ - &, - *, - *::after, - *::before { - box-sizing: border-box; + @if $plyr-border-box == true { + // border-box everything + // http://paulirish.com/2012/box-sizing-border-box-ftw/ + &, + *, + *::after, + *::before { + box-sizing: border-box; + } } - // Fix 300ms delay - a, button, input, label { + @if $plyr-touch-action == true { + // Fix 300ms delay + a, button, input, label { touch-action: manipulation; + } } // Media elements @@ -138,13 +142,23 @@ // Screen reader only elements .plyr__sr-only { - position: absolute !important; clip: rect(1px, 1px, 1px, 1px); - padding: 0 !important; - border: 0 !important; - height: 1px !important; - width: 1px !important; overflow: hidden; + + // !important is not always needed + @if $plyr-sr-only-important == true { + position: absolute !important; + padding: 0 !important; + border: 0 !important; + height: 1px !important; + width: 1px !important; + } @else { + position: absolute; + padding: 0; + border: 0; + height: 1px; + width: 1px; + } } // Video @@ -629,6 +643,7 @@ // -------------------------------------------------------------- .plyr .plyr__volume { display: none; + flex: 1; position: relative; input[type="range"] { diff --git a/src/scss/variables.scss b/src/scss/variables.scss index baf47e25..7cc7e34c 100644 --- a/src/scss/variables.scss +++ b/src/scss/variables.scss @@ -4,6 +4,11 @@ // https://robots.thoughtbot.com/sass-default // ========================================================================== +// Settings +$plyr-border-box: true !default; +$plyr-touch-action: true !default; +$plyr-sr-only-important: true !default; + // Colors $plyr-color-main: #3498db !default; |