Skip to content

Commit 3305d60

Browse files
committed
Portal.view.home.parts.BaseContainer: move the page fade-in animations here #5504
1 parent 291ecef commit 3305d60

2 files changed

Lines changed: 29 additions & 47 deletions

File tree

resources/scss/src/apps/portal/home/MainContainer.scss

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,4 @@
22
overflow-x : hidden!important;
33
scroll-behavior : smooth;
44
scroll-snap-type: y mandatory;
5-
6-
@keyframes appear-left {
7-
0% {
8-
transform: translateX(-400%);
9-
opacity : 0;
10-
}
11-
90% {
12-
opacity: .3;
13-
}
14-
100% {
15-
transform: translateX(0);
16-
opacity : 1;
17-
}
18-
}
19-
20-
@keyframes appear-right {
21-
0% {
22-
transform: translateX(400%);
23-
opacity : 0;
24-
}
25-
90% {
26-
opacity: .3;
27-
}
28-
100% {
29-
transform: translateX(0);
30-
opacity : 1;
31-
}
32-
}
33-
34-
.portal-home-content-view {
35-
&:not(:first-child) {
36-
&:not(:last-child) {
37-
animation-timeline : view(block 100% -500%);
38-
animation-fill-mode : both;
39-
animation-duration : 1ms; /* Firefox requires this to apply the animation */
40-
animation-timing-function: linear;
41-
42-
&:nth-child(even) {
43-
animation-name: appear-right;
44-
}
45-
46-
&:nth-child(odd) {
47-
animation-name: appear-left;
48-
}
49-
}
50-
}
51-
}
525
}

resources/scss/src/apps/portal/home/parts/BaseContainer.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22
min-height : 100%;
33
scroll-snap-align: center;
44

5+
@keyframes appear-left {
6+
0% {opacity: 0; transform: translateX(-400%);}
7+
90% {opacity: .3;}
8+
100% {opacity: 1; transform: translateX(0);}
9+
}
10+
11+
@keyframes appear-right {
12+
0% {opacity: 0; transform: translateX(400%);}
13+
90% {opacity: .3;}
14+
100% {opacity: 1; transform: translateX(0);}
15+
}
16+
17+
&:not(:first-child) {
18+
&:not(:last-child) {
19+
animation-timeline : view(block 100% -500%);
20+
animation-fill-mode : both;
21+
animation-duration : 1ms; /* Firefox requires this to apply the animation */
22+
animation-timing-function: linear;
23+
24+
&:nth-child(even) {
25+
animation-name: appear-right;
26+
}
27+
28+
&:nth-child(odd) {
29+
animation-name: appear-left;
30+
}
31+
}
32+
}
33+
534
.neo-content {
635
font-size: min(max(2.3vw, 16px), 30px);
736
}

0 commit comments

Comments
 (0)