-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTable.scss
107 lines (84 loc) · 2.27 KB
/
Table.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
97
98
99
100
101
102
103
104
105
106
107
@use "App";
#table {
width: 80%;
max-width: 40rem;
margin-top: 0;
$table-stroke-duration: App.$stroke-anim-duration * 2;
.table-row {
$anim-delay: 0s;
display: flex;
flex-direction: row;
height: 2.1rem;
align-items: center;
position: relative;
&:not(:first-of-type) h2 {
font-weight: 500;
}
@for $i from 0 to 13 {
.stroke {
// noinspection Stylelint
@extend .stroke-common;
clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
&#stroke#{$i} {
$anim-delay: #{$i * 0.2}s;
animation: $table-stroke-duration draw-stroke forwards $anim-delay;
}
&.reverse-anim {
&#stroke#{$i} {
$anim-delay: #{$i * 0.2}s;
animation: $table-stroke-duration draw-stroke-reversed forwards $anim-delay;
}
}
}
}
@keyframes draw-stroke-reversed {
from {
$viewport-width: 100%;
clip-path: polygon(0 0, $viewport-width 0, $viewport-width 100%, 0 100%);
}
to {
$viewport-width: 0;
clip-path: polygon(0 0, $viewport-width 0, $viewport-width 100%, 0 100%);
}
}
}
}
@media (width <= 650px), (height <= 650px) {
#table {
width: 80%;
}
#table .table-row {
height: unset;
align-items: flex-start;
.stroke {
height: 100%;
width: 110%;
}
h2 {
line-height: 1.3rem;
margin: 0.5rem 0;
font-size: 1.2rem;
max-width: 10rem;
padding-right: 1rem;
}
.divisor, .rule, .divisible {
flex-shrink: 0;
}
.divisor {
flex: 2.4;
}
.rule {
flex: 5;
align-items: flex-start;
img {
margin-top: 0.6rem;
height: 1.0rem;
margin-left: auto;
margin-right: 0.7rem;
}
}
.divisible {
flex: 2.5;
}
}
}