Skip to content

Commit

Permalink
chore: Player skin changes for sass >= 1.77.7
Browse files Browse the repository at this point in the history
Signed-off-by: eXhumer <[email protected]>
  • Loading branch information
eXhumer committed Aug 17, 2024
1 parent e3c0a24 commit b0de2bf
Show file tree
Hide file tree
Showing 17 changed files with 128 additions and 81 deletions.
29 changes: 19 additions & 10 deletions src/Player/React/Skin/SkinModern/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
}

@mixin hidden-animated($duration: $animation-duration) {
opacity: 1;
transition: hidden-animated-transition($duration);
visibility: visible;
& {
opacity: 1;
transition: hidden-animated-transition($duration);
visibility: visible;
}

&.#{$prefix}-hidden {
opacity: 0;
Expand Down Expand Up @@ -54,7 +56,10 @@
}

@include hidden-animated($duration);
transition: $transitions-string;

& {
transition: $transitions-string;
}
}

// Cover the whole parent element
Expand All @@ -69,16 +74,20 @@

// Align to parent's bottom
@mixin layout-align-bottom {
bottom: 0;
position: absolute;
width: 100%;
& {
bottom: 0;
position: absolute;
width: 100%;
}
}

// Align to parent's top
@mixin layout-align-top {
position: absolute;
top: 0;
width: 100%;
& {
position: absolute;
top: 0;
width: 100%;
}
}

// H/V center items in the middle of the overlay
Expand Down
12 changes: 8 additions & 4 deletions src/Player/React/Skin/SkinModern/_skin-smallscreen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
@include layout-cover;
@include layout-center-children-in-container;

display: flex;
& {
display: flex;
}

.#{$prefix}-ui-settings-panel-page {
min-width: 15em;
Expand Down Expand Up @@ -132,9 +134,11 @@
> * {
@include hidden; // Add hidden here too, else it is overwritten by display: table-cell

display: table-cell;
vertical-align: middle;
width: 1em;
& {
display: table-cell;
vertical-align: middle;
width: 1em;
}
}

.#{$prefix}-label-metadata-title {
Expand Down
18 changes: 11 additions & 7 deletions src/Player/React/Skin/SkinModern/components/_bufferingoverlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
@include layout-cover;
@include hidden-animated($animation-duration * 2);

background-color: $color-background-highlight;
& {
background-color: $color-background-highlight;
}

> .#{$prefix}-container-wrapper {
padding: 3em;
Expand Down Expand Up @@ -63,12 +65,14 @@
}
}

animation: #{$prefix}-fancy $buffering-animation-duration ease-in infinite;
background: url('../Asset/SkinModern/images/loader.svg') no-repeat center;
display: inline-block;
height: 2em;
margin: .2em;
width: 2em;
& {
animation: #{$prefix}-fancy $buffering-animation-duration ease-in infinite;
background: url('../Asset/SkinModern/images/loader.svg') no-repeat center;
display: inline-block;
height: 2em;
margin: .2em;
width: 2em;
}

@for $i from 1 through 3 {
&:nth-child(#{$i}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
@include layout-cover;
@include hidden-animated;

background: $color-background url('../Asset/SkinModern/images/chromecast.svg') center no-repeat;
background-size: 7em 7em;
& {
background: $color-background url('../Asset/SkinModern/images/chromecast.svg') center no-repeat;
background-size: 7em 7em;
}

.#{$prefix}-ui-cast-status-label {
color: $color-primary;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
}
}

background-image: url('../Asset/SkinModern/images/close.svg');
& {
background-image: url('../Asset/SkinModern/images/close.svg');
}

&:hover {
@include svg-icon-shadow;
Expand Down
16 changes: 10 additions & 6 deletions src/Player/React/Skin/SkinModern/components/_controlbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
@include hidden-animated-focusable;
@include layout-align-bottom;

background: linear-gradient(to bottom, $color-transparent, $color-background-bars);
box-sizing: border-box;
line-height: 1em;
padding: 1em 1em .5em;
& {
background: linear-gradient(to bottom, $color-transparent, $color-background-bars);
box-sizing: border-box;
line-height: 1em;
padding: 1em 1em .5em;
}

.#{$prefix}-controlbar-top,
.#{$prefix}-controlbar-bottom {
Expand Down Expand Up @@ -56,8 +58,10 @@
> * {
@include hidden; // Add hidden here too, else it is overwritten by display: table-cell

display: table-cell;
vertical-align: middle;
& {
display: table-cell;
vertical-align: middle;
}
}

.#{$prefix}-ui-volumeslider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
@include layout-cover;
@include hidden;

background-color: $color-background;
pointer-events: none;
& {
background-color: $color-background;
pointer-events: none;
}

.#{$prefix}-ui-errormessage-label {
color: $color-primary;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@
}
}

cursor: default;
height: 8em;
outline: none;
overflow: hidden; // hide overflow from scale animation
width: 8em;
& {
cursor: default;
height: 8em;
outline: none;
overflow: hidden; // hide overflow from scale animation
width: 8em;
}

.#{$prefix}-image {
background-image: url('../Asset/SkinModern/images/play_big.svg');
Expand Down
6 changes: 4 additions & 2 deletions src/Player/React/Skin/SkinModern/components/_label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

@include hidden;

cursor: default;
white-space: nowrap;
& {
cursor: default;
white-space: nowrap;
}
}

.#{$prefix}-ui-label {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
@include layout-center-children-in-container;
@include hidden-animated($animation-duration * 2);

background-color: $color-background-highlight;
& {
background-color: $color-background-highlight;
}

> .#{$prefix}-container-wrapper {
padding: 3em;
Expand Down
12 changes: 7 additions & 5 deletions src/Player/React/Skin/SkinModern/components/_seekbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ $seekbar-height: .3125em;
@include hidden;
@include focusable;

cursor: pointer;
font-size: 1em;
height: 1em;
position: relative;
width: 100%;
& {
cursor: pointer;
font-size: 1em;
height: 1em;
position: relative;
width: 100%;
}

$bar-inset: auto;

Expand Down
14 changes: 8 additions & 6 deletions src/Player/React/Skin/SkinModern/components/_seekbarlabel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

@include hidden-animated;

bottom: 100%;
left: 0;
margin-bottom: 1em;
pointer-events: none;
position: absolute;
text-align: center;
& {
bottom: 100%;
left: 0;
margin-bottom: 1em;
pointer-events: none;
position: absolute;
text-align: center;
}

// Center container on left edge to get it centered over timeline position
%center-on-left-edge {
Expand Down
14 changes: 8 additions & 6 deletions src/Player/React/Skin/SkinModern/components/_selectbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@

@include focusable;

background-color: transparent;
border: 0;
color: $color-highlight;
cursor: pointer;
font-size: .8em;
padding: .3em;
& {
background-color: transparent;
border: 0;
color: $color-highlight;
cursor: pointer;
font-size: .8em;
padding: .3em;
}

option {
color: $color-secondary;
Expand Down
14 changes: 8 additions & 6 deletions src/Player/React/Skin/SkinModern/components/_settingspanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@

$background-color: transparentize($color-background, .15);

background-color: $background-color;
bottom: 5em;
overflow: hidden;
padding: 0;
position: absolute;
right: 2em;
& {
background-color: $background-color;
bottom: 5em;
overflow: hidden;
padding: 0;
position: absolute;
right: 2em;
}

> .#{$prefix}-container-wrapper {
margin: .5em;
Expand Down
20 changes: 11 additions & 9 deletions src/Player/React/Skin/SkinModern/components/_subtitleoverlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@

@include hidden;

bottom: 0;
font-size: 1.2em;
left: 0;
pointer-events: none;
position: absolute;
right: 0;
text-align: center;
top: 0;
transition: bottom $animation-duration-short ease-out;
& {
bottom: 0;
font-size: 1.2em;
left: 0;
pointer-events: none;
position: absolute;
right: 0;
text-align: center;
top: 0;
transition: bottom $animation-duration-short ease-out;
}

* {
// This aims to prevent possibly conflicting style definitions inherited
Expand Down
10 changes: 6 additions & 4 deletions src/Player/React/Skin/SkinModern/components/_titlebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
@include hidden-animated-focusable;
@include layout-align-top;

background: linear-gradient(to top, $color-transparent, $color-background-bars);
box-sizing: border-box;
padding: .5em 1em 1em;
pointer-events: none;
& {
background: linear-gradient(to top, $color-transparent, $color-background-bars);
box-sizing: border-box;
padding: .5em 1em 1em;
pointer-events: none;
}

> .#{$prefix}-container-wrapper {
padding: .5em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
.#{$prefix}-ui-volumeslider {
@include animate-slide-in-from-bottom(6em, $animation-duration-short);

background-color: $color-background;
bottom: 100%;
height: 6em;
position: absolute;
width: 1.5em;
& {
background-color: $color-background;
bottom: 100%;
height: 6em;
position: absolute;
width: 1.5em;
}

.#{$prefix}-seekbar {
bottom: .5em;
Expand Down

0 comments on commit b0de2bf

Please sign in to comment.