aboutsummaryrefslogtreecommitdiffstats
path: root/src/sass/lib/mixins.scss
blob: cbb8cc78a3a9be75dd8577b8f050ba5100369a8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// ==========================================================================
// Mixins
// ==========================================================================

// Nicer focus styles
// ---------------------------------------
@mixin plyr-tab-focus($color: $plyr-tab-focus-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;
  }
}

// <input type="range"> styling
// ---------------------------------------
@mixin plyr-range-track() {
  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;
}

@mixin plyr-range-thumb-active($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;
  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;
  }

  // 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;
    }
  }
}