aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2016-05-14 00:48:56 +1000
committerSam Potts <me@sampotts.me>2016-05-14 00:48:56 +1000
commit448c070898b243d047b4fe102ddb165af1b21554 (patch)
tree79a6696306527bccbba7d4b456b78f1aca48705b /src
parent7f624ebbb7f32bc54bb57d77a8408446e819f43a (diff)
parent31c933af3838669a6bb043cafe7778a810303f47 (diff)
downloadplyr-448c070898b243d047b4fe102ddb165af1b21554.tar.lz
plyr-448c070898b243d047b4fe102ddb165af1b21554.tar.xz
plyr-448c070898b243d047b4fe102ddb165af1b21554.zip
Merge branch 'master' of https://github.com/Selz/plyr
# Conflicts: # dist/plyr.css
Diffstat (limited to 'src')
-rw-r--r--src/less/plyr.less45
-rw-r--r--src/less/variables.less5
-rw-r--r--src/scss/plyr.scss42
-rw-r--r--src/scss/variables.scss5
4 files changed, 68 insertions, 29 deletions
diff --git a/src/less/plyr.less b/src/less/plyr.less
index ee07ed47..ee7d5b78 100644
--- a/src/less/plyr.less
+++ b/src/less/plyr.less
@@ -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;
+ & 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
@@ -138,13 +142,24 @@
// 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;
+ }
}
// Video
diff --git a/src/less/variables.less b/src/less/variables.less
index ef3b4e45..0b2d0895 100644
--- a/src/less/variables.less
+++ b/src/less/variables.less
@@ -3,6 +3,11 @@
// https://github.com/selz/plyr
// ==========================================================================
+// 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 0d6f28a7..7673efee 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
diff --git a/src/scss/variables.scss b/src/scss/variables.scss
index ad63423a..5aa0d629 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;