File tree Expand file tree Collapse file tree 3 files changed +79
-0
lines changed
Expand file tree Collapse file tree 3 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ @use " ../01-abstract/variables" as * ;
2+ @use " sass:math" ;
3+
4+ .lazyload ,
5+ .lazyloading {
6+ background : $color-grey-200 ;
7+ opacity : 0 ;
8+ }
9+
10+ .lazyloaded {
11+ opacity : 1 ;
12+ transition : opacity .5s ;
13+ }
14+
15+ // css loading for bgset items
16+ // with basicspinner
17+ $loading-dimensions : 50px ;
18+
19+ [data-bgset ] {
20+ position : relative ;
21+ background-repeat : no-repeat ;
22+ background-position : 50% 50% ;
23+ background-size : cover ;
24+ opacity : 1 ;
25+
26+ & ::before {
27+ position : absolute ;
28+ top : 0 ;
29+ right : 0 ;
30+ bottom : 0 ;
31+ left : 0 ;
32+ z-index : 2 ;
33+ content : " " ;
34+ background : $color-primary ;
35+ transition : opacity .5s , z-index .5s ease .5s ;
36+ }
37+
38+ & ::after {
39+ position : absolute ;
40+ top : calc (50% - #{math .div ($loading-dimensions , 2 )} );
41+ left : calc (50% - #{math .div ($loading-dimensions , 2 )} );
42+ z-index : 3 ;
43+ width : $loading-dimensions ;
44+ height : $loading-dimensions ;
45+ content : " " ;
46+ border : 5px solid $color-light ;
47+ border-top-color : transparent ;
48+ border-radius : $loading-dimensions ;
49+ opacity : 1 ;
50+ transition : opacity .5s , z-index .5s ease .5s ;
51+ transform : translateX (-50% ) translateY (-50% );
52+ animation : loading .5s linear infinite ;
53+ }
54+
55+ & .lazyload {
56+ opacity : 1 ;
57+ transition : opacity .5s ;
58+ }
59+
60+ & .lazyloaded {
61+ & ::after ,
62+ & ::before {
63+ z-index : -1 ;
64+ opacity : 0 ;
65+ }
66+ }
67+ }
68+
69+ @keyframes loading {
70+ 0% {
71+ transform : rotate (0deg );
72+ }
73+
74+ 100% {
75+ transform : rotate (360deg );
76+ }
77+ }
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ variables.$entry-file-name: "editor";
2727
2828@use " 04-utilities/wp-admin-bar" ;
2929@use " 04-utilities/focus" ;
30+ @use " 04-utilities/lazyload" ;
3031@use " 04-utilities/seo" ;
3132@use " 04-utilities/video-wrapper" ;
3233@use " 04-utilities/palette" ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ variables.$entry-file-name: "style";
3131
3232@use " 04-utilities/wp-admin-bar" ;
3333@use " 04-utilities/focus" ;
34+ @use " 04-utilities/lazyload" ;
3435@use " 04-utilities/seo" ;
3536@use " 04-utilities/video-wrapper" ;
3637@use " 04-utilities/palette" ;
You can’t perform that action at this time.
0 commit comments