UNPKG

3.07 kBSCSSView Raw
1@import 'lg-variables';
2@import 'lg-mixins';
3.lg-outer {
4 .lg-video-cont {
5 text-align: center;
6 display: inline-block;
7 vertical-align: middle;
8 position: relative;
9 .lg-object {
10 width: 100% !important;
11 height: 100% !important;
12 }
13 }
14
15 .lg-has-iframe {
16 .lg-video-cont {
17 -webkit-overflow-scrolling: touch;
18 overflow: auto;
19 }
20 }
21 .lg-video-object {
22 position: absolute;
23 left: 0;
24 right: 0;
25 width: 100%;
26 height: 100%;
27 top: 0;
28 bottom: 0;
29 z-index: 3;
30 }
31 .lg-video-poster {
32 z-index: 1;
33 }
34
35 .lg-has-video {
36 .lg-video-object {
37 opacity: 0;
38 will-change: opacity;
39 @include transition(opacity 0.3s ease-in);
40 }
41
42 &.lg-video-loaded {
43 .lg-video-poster,
44 .lg-video-play-button {
45 opacity: 0 !important;
46 }
47
48 .lg-video-object {
49 opacity: 1;
50 }
51 }
52 }
53}
54
55@keyframes lg-play-stroke {
56 0% {
57 stroke-dasharray: 1, 200;
58 stroke-dashoffset: 0;
59 }
60
61 50% {
62 stroke-dasharray: 89, 200;
63 stroke-dashoffset: -35px;
64 }
65
66 100% {
67 stroke-dasharray: 89, 200;
68 stroke-dashoffset: -124px;
69 }
70}
71
72@keyframes lg-play-rotate {
73 100% {
74 -webkit-transform: rotate(360deg);
75 transform: rotate(360deg);
76 }
77}
78
79.lg-video-play-button {
80 width: 18%;
81 max-width: 140px;
82 position: absolute;
83 top: 50%;
84 left: 50%;
85 z-index: 2;
86 cursor: pointer;
87 transform: translate(-50%, -50%) scale(1);
88 will-change: opacity, transform;
89 @include transitionCustom(
90 transform 0.25s cubic-bezier(0.17, 0.88, 0.32, 1.28),
91 opacity 0.1s
92 );
93 &:hover {
94 .lg-video-play-icon-bg,
95 .lg-video-play-icon {
96 opacity: 1;
97 }
98 }
99}
100.lg-video-play-icon-bg {
101 fill: none;
102 stroke-width: 3%;
103 stroke: #fcfcfc;
104 opacity: 0.6;
105 will-change: opacity;
106 @include transition(opacity 0.12s ease-in);
107}
108.lg-video-play-icon-circle {
109 position: absolute;
110 top: 0;
111 left: 0;
112 bottom: 0;
113 right: 0;
114 fill: none;
115 stroke-width: 3%;
116 stroke: rgba(30, 30, 30, 0.9);
117 stroke-opacity: 1;
118 stroke-linecap: round;
119 stroke-dasharray: 200;
120 stroke-dashoffset: 200;
121}
122
123.lg-video-play-icon {
124 position: absolute;
125 width: 25%;
126 max-width: 120px;
127 left: 50%;
128 top: 50%;
129 transform: translate3d(-50%, -50%, 0);
130 opacity: 0.6;
131 will-change: opacity;
132 @include transition(opacity 0.12s ease-in);
133 .lg-video-play-icon-inner {
134 fill: #fcfcfc;
135 }
136}
137
138.lg-video-loading {
139 .lg-video-play-icon-circle {
140 animation: lg-play-rotate 2s linear 0.25s infinite,
141 lg-play-stroke 1.5s ease-in-out 0.25s infinite;
142 }
143}
144.lg-video-loaded {
145 .lg-video-play-button {
146 opacity: 0;
147 transform: translate(-50%, -50%) scale(0.7);
148 }
149}