aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobin Poort <robin@timble.net>2016-05-11 13:46:40 +0200
committerRobin Poort <robin@timble.net>2016-05-11 13:46:40 +0200
commitb23a16826ea2d9ee749449612f21c826d49c5616 (patch)
treeaee9f2a79ffd13b0f00bbda4e726494f468d75d3 /src
parent2a822d7b45e83972ee84d3b5118c027258d70f5e (diff)
downloadplyr-b23a16826ea2d9ee749449612f21c826d49c5616.tar.lz
plyr-b23a16826ea2d9ee749449612f21c826d49c5616.tar.xz
plyr-b23a16826ea2d9ee749449612f21c826d49c5616.zip
Adding SCSS settings
- Added setting to be able to disable the border-box if you already defined that in your own css - Added setting to be able to disable touch-action if you already defined that in your own css - Added setting to choose not to use !important for sr-only class
Diffstat (limited to 'src')
-rw-r--r--src/scss/plyr.scss42
-rw-r--r--src/scss/variables.scss5
2 files changed, 33 insertions, 14 deletions
diff --git a/src/scss/plyr.scss b/src/scss/plyr.scss
index 0cb8968d..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
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;