Converted to 2 space indentation
This commit is contained in:
@ -3,29 +3,29 @@
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@keyframes plyr-progress {
|
||||
to {
|
||||
background-position: $plyr-progress-loading-size 0;
|
||||
}
|
||||
to {
|
||||
background-position: $plyr-progress-loading-size 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes plyr-popup {
|
||||
0% {
|
||||
opacity: 0.5;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
0% {
|
||||
opacity: 0.5;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes plyr-fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
@ -11,12 +11,12 @@ $css-vars-use-native: false !default;
|
||||
// Assigns a variable to the global map
|
||||
///
|
||||
@function css-var-assign($varName: null, $varValue: null) {
|
||||
@return map-merge(
|
||||
$css-vars,
|
||||
(
|
||||
$varName: $varValue,
|
||||
)
|
||||
);
|
||||
@return map-merge(
|
||||
$css-vars,
|
||||
(
|
||||
$varName: $varValue,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
///
|
||||
@ -30,33 +30,33 @@ $css-vars-use-native: false !default;
|
||||
// background: var(--main-background, green);
|
||||
///
|
||||
@function var($args...) {
|
||||
// CHECK PARAMS
|
||||
@if (length($args) ==0) {
|
||||
@error 'Variable name is expected to be passed to the var() function';
|
||||
}
|
||||
@if (str-length(nth($args, 1)) < 2 or str-slice(nth($args, 1), 0, 2) != '--') {
|
||||
@error "Variable name is expected to start from '--'";
|
||||
// CHECK PARAMS
|
||||
@if (length($args) ==0) {
|
||||
@error 'Variable name is expected to be passed to the var() function';
|
||||
}
|
||||
@if (str-length(nth($args, 1)) < 2 or str-slice(nth($args, 1), 0, 2) != '--') {
|
||||
@error "Variable name is expected to start from '--'";
|
||||
}
|
||||
|
||||
// PROCESS
|
||||
$var-name: nth($args, 1);
|
||||
$var-value: map-get($css-vars, $var-name);
|
||||
|
||||
@if ($css-vars-use-native) {
|
||||
// CSS variables
|
||||
// Native CSS: don't process function in case of native
|
||||
@return unquote('var(' + $args + ')');
|
||||
} @else {
|
||||
@if ($var-value == null) {
|
||||
// variable is not provided so far
|
||||
@if (length($args) == 2) {
|
||||
$var-value: nth($args, 2);
|
||||
}
|
||||
}
|
||||
|
||||
// PROCESS
|
||||
$var-name: nth($args, 1);
|
||||
$var-value: map-get($css-vars, $var-name);
|
||||
|
||||
@if ($css-vars-use-native) {
|
||||
// CSS variables
|
||||
// Native CSS: don't process function in case of native
|
||||
@return unquote('var(' + $args + ')');
|
||||
} @else {
|
||||
@if ($var-value == null) {
|
||||
// variable is not provided so far
|
||||
@if (length($args) == 2) {
|
||||
$var-value: nth($args, 2);
|
||||
}
|
||||
}
|
||||
|
||||
// Sass: return value from the map
|
||||
@return $var-value;
|
||||
}
|
||||
// Sass: return value from the map
|
||||
@return $var-value;
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
@ -69,32 +69,32 @@ $css-vars-use-native: false !default;
|
||||
// ));
|
||||
///
|
||||
@mixin css-vars($var-map: null) {
|
||||
// CHECK PARAMS
|
||||
@if ($var-map == null) {
|
||||
@error 'Map of variables is expected, instead got: null';
|
||||
}
|
||||
@if (type_of($var-map) != map) {
|
||||
@error 'Map of variables is expected, instead got another type passed: #{type_of($var, ap)}';
|
||||
}
|
||||
// CHECK PARAMS
|
||||
@if ($var-map == null) {
|
||||
@error 'Map of variables is expected, instead got: null';
|
||||
}
|
||||
@if (type_of($var-map) != map) {
|
||||
@error 'Map of variables is expected, instead got another type passed: #{type_of($var, ap)}';
|
||||
}
|
||||
|
||||
// PROCESS
|
||||
@if ($css-vars-use-native) {
|
||||
// CSS variables
|
||||
// Native CSS: assign CSS custom properties to the global scope
|
||||
@at-root :root {
|
||||
@each $var-name, $var-value in $var-map {
|
||||
@if (type_of($var-value) == string) {
|
||||
#{$var-name}: $var-value; // to prevent quotes interpolation
|
||||
} @else {
|
||||
#{$var-name}: #{$var-value};
|
||||
}
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
// Sass or debug
|
||||
// merge variables and values to the global map (provides no output)
|
||||
@each $var-name, $var-value in $var-map {
|
||||
$css-vars: css-var-assign($varName, $varValue) !global; // store in global variable
|
||||
// PROCESS
|
||||
@if ($css-vars-use-native) {
|
||||
// CSS variables
|
||||
// Native CSS: assign CSS custom properties to the global scope
|
||||
@at-root :root {
|
||||
@each $var-name, $var-value in $var-map {
|
||||
@if (type_of($var-value) == string) {
|
||||
#{$var-name}: $var-value; // to prevent quotes interpolation
|
||||
} @else {
|
||||
#{$var-name}: #{$var-value};
|
||||
}
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
// Sass or debug
|
||||
// merge variables and values to the global map (provides no output)
|
||||
@each $var-name, $var-value in $var-map {
|
||||
$css-vars: css-var-assign($varName, $varValue) !global; // store in global variable
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,5 +3,5 @@
|
||||
// ==========================================================================
|
||||
|
||||
@function to-percentage($input) {
|
||||
@return $input * 1%;
|
||||
@return $input * 1%;
|
||||
}
|
||||
|
@ -4,97 +4,95 @@
|
||||
|
||||
// Nicer focus styles
|
||||
// ---------------------------------------
|
||||
@mixin plyr-tab-focus() {
|
||||
// box-shadow: 0 0 0 5px rgba($color, 0.5);
|
||||
// outline: 0;
|
||||
outline-color: var(--plyr-color-main);
|
||||
outline-offset: 2px;
|
||||
outline-style: dotted;
|
||||
outline-width: 3px;
|
||||
@mixin plyr-tab-focus($color: $plyr-tab-focus-default-color) {
|
||||
outline-color: $color;
|
||||
outline-offset: 2px;
|
||||
outline-style: dotted;
|
||||
outline-width: 3px;
|
||||
}
|
||||
|
||||
// Font smoothing
|
||||
// ---------------------------------------
|
||||
@mixin plyr-font-smoothing($mode: true) {
|
||||
@if $mode {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
} @else {
|
||||
-moz-osx-font-smoothing: auto;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
}
|
||||
@if $mode {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
} @else {
|
||||
-moz-osx-font-smoothing: auto;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
}
|
||||
}
|
||||
|
||||
// <input type="range"> styling
|
||||
// ---------------------------------------
|
||||
@mixin plyr-range-track() {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-radius: ($plyr-range-track-height / 2);
|
||||
height: $plyr-range-track-height;
|
||||
transition: box-shadow 0.3s ease;
|
||||
user-select: none;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-radius: calc(#{$plyr-range-track-height} / 2);
|
||||
height: $plyr-range-track-height;
|
||||
transition: box-shadow 0.3s ease;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@mixin plyr-range-thumb() {
|
||||
background: $plyr-range-thumb-background;
|
||||
border: 0;
|
||||
border-radius: 100%;
|
||||
box-shadow: $plyr-range-thumb-shadow;
|
||||
height: $plyr-range-thumb-height;
|
||||
position: relative;
|
||||
transition: all 0.2s ease;
|
||||
width: $plyr-range-thumb-height;
|
||||
background: $plyr-range-thumb-background;
|
||||
border: 0;
|
||||
border-radius: 100%;
|
||||
box-shadow: $plyr-range-thumb-shadow;
|
||||
height: $plyr-range-thumb-height;
|
||||
position: relative;
|
||||
transition: all 0.2s ease;
|
||||
width: $plyr-range-thumb-height;
|
||||
}
|
||||
|
||||
@mixin plyr-range-thumb-active($color: rgba($plyr-range-thumb-background, 0.5)) {
|
||||
box-shadow: $plyr-range-thumb-shadow, 0 0 0 $plyr-range-thumb-active-shadow-width $color;
|
||||
@mixin plyr-range-thumb-active($color: $plyr-range-thumb-active-shadow-color) {
|
||||
box-shadow: $plyr-range-thumb-shadow, 0 0 0 $plyr-range-thumb-active-shadow-width $color;
|
||||
}
|
||||
|
||||
// Fullscreen styles
|
||||
// ---------------------------------------
|
||||
@mixin plyr-fullscreen-active() {
|
||||
background: #000;
|
||||
border-radius: 0 !important;
|
||||
background: #000;
|
||||
border-radius: 0 !important;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
|
||||
video {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
video {
|
||||
height: 100%;
|
||||
.plyr__video-wrapper {
|
||||
height: 100%;
|
||||
position: static;
|
||||
}
|
||||
|
||||
// Vimeo requires some different styling
|
||||
&.plyr--vimeo .plyr__video-wrapper {
|
||||
height: 0;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
// Display correct icon
|
||||
.plyr__control .icon--exit-fullscreen {
|
||||
display: block;
|
||||
|
||||
+ svg {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.plyr__video-wrapper {
|
||||
height: 100%;
|
||||
position: static;
|
||||
}
|
||||
|
||||
// Vimeo requires some different styling
|
||||
&.plyr--vimeo .plyr__video-wrapper {
|
||||
height: 0;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
// Display correct icon
|
||||
.plyr__control .icon--exit-fullscreen {
|
||||
display: block;
|
||||
|
||||
+ svg {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Hide cursor in fullscreen when controls hidden
|
||||
&.plyr--hide-controls {
|
||||
cursor: none;
|
||||
}
|
||||
|
||||
// Large captions in full screen on larger screens
|
||||
@media (min-width: $plyr-bp-lg) {
|
||||
.plyr__captions {
|
||||
font-size: $plyr-font-size-captions-large;
|
||||
}
|
||||
// Hide cursor in fullscreen when controls hidden
|
||||
&.plyr--hide-controls {
|
||||
cursor: none;
|
||||
}
|
||||
|
||||
// Large captions in full screen on larger screens
|
||||
@media (min-width: $plyr-bp-lg) {
|
||||
.plyr__captions {
|
||||
font-size: $plyr-font-size-captions-large;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user