-
Notifications
You must be signed in to change notification settings - Fork 217
/
style.final.scss
96 lines (83 loc) · 1.74 KB
/
style.final.scss
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
94
95
96
@import '../styles/base.scss';
body {
display: flex;
justify-content: center;
align-items: center;
}
#app {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
grid-template-areas: 'figure';
grid-column-gap: 2rem;
width: 20vw;
aspect-ratio: 1;
border: 1px solid;
&[data-state='collapsed'] {
.ui-content {
display: none;
}
}
&[data-state='expanded'] {
padding: 2rem;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr;
grid-template-areas: 'figure content';
aspect-ratio: 2;
width: 70vw;
}
}
.ui-content {
grid-area: content;
animation: content 0.3s 0.3s both;
}
@keyframes content {
from {
opacity: 0;
transform: translateX(-2rem);
}
to {
opacity: 1;
transform: none;
}
}
.ui-figure {
display: flex;
justify-content: center;
align-items: center;
&:before {
content: '';
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: linear-gradient(to bottom right, #124269, #309aef);
transform-origin: top left;
}
&[data-flip='invert']:before {
transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px))
scale(var(--dw), var(--dh));
}
&[data-flip='play']:before {
transition: transform 0.3s;
transform: none;
}
> .ui-caption {
font-size: 2rem;
font-weight: bold;
color: white;
}
}
[data-flip] {
&[data-flip-bg][data-flip='invert']:before,
&:not([data-flip-bg])[data-flip='invert'] {
transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px))
scale(var(--dw), var(--dh));
}
&[data-flip-bg][data-flip='play']:before,
&:not([data-flip-bg])[data-flip='play'] {
transition: transform 0.3s;
transform: none;
}
}