aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobin Poort <robin@timble.net>2016-05-11 13:46:19 +0200
committerRobin Poort <robin@timble.net>2016-05-11 13:46:19 +0200
commit2a822d7b45e83972ee84d3b5118c027258d70f5e (patch)
tree094f9b7959c0b6efa7aa26763ecd4e34715c58e2 /src
parentcc5b363d662cf9a4f60919a4cf94913e6b588149 (diff)
downloadplyr-2a822d7b45e83972ee84d3b5118c027258d70f5e.tar.lz
plyr-2a822d7b45e83972ee84d3b5118c027258d70f5e.tar.xz
plyr-2a822d7b45e83972ee84d3b5118c027258d70f5e.zip
Adding LESS 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/less/plyr.less45
-rw-r--r--src/less/variables.less5
2 files changed, 35 insertions, 15 deletions
diff --git a/src/less/plyr.less b/src/less/plyr.less
index 69846a10..1b5c7eb2 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 ea5c6b8e..fa0f83e9 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;