-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
124 lines (104 loc) · 2.28 KB
/
style.css
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
:root {
--cube-size: min(30vw, 30vh);
--cube-half-size: calc(var(--cube-size) / 2);
--ff-size: calc(0.9 * var(--cube-size));
--cube-face-color: linear-gradient(rgba(212, 0, 0, 0.1), rgb(56, 0, 238));
}
* {
box-sizing: border-box;
}
html,
body {
height: 99%;
font-family: monospace;
}
body {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
align-items: center;
padding-bottom: 5rem;
padding-inline: 5rem;
}
.github-link {
display: flex;
color: black;
text-decoration: none;
align-items: center;
}
.github-link:hover {
text-decoration: underline;
}
.github-link:visited {
color: black;
}
.github-link img {
width: 1.3em;
height: 1.3em;
margin-right: 0.7em;
}
.rotation-container {
position: relative;
display: flex;
justify-content: center;
align-items: center;
height: calc(var(--cube-size) * 1.5);
width: calc(var(--cube-size) * 1.5);
/* border: 1px solid red; */
perspective: calc(var(--cube-size) * 1.5);
}
.cube {
/* border: 1px solid red; */
width: var(--cube-size);
height: var(--cube-size);
transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
}
.face {
display: flex;
justify-content: center;
align-items: center;
font-size: var(--ff-size);
width: 100%;
height: 100%;
border: 1px solid gray;
}
.cube__face {
position: absolute;
background: var(--cube-face-color);
}
.cube__face-front {
background: var(--cube-face-color);
transform: translateZ(var(--cube-half-size));
}
.cube__face-back {
background: var(--cube-face-color);
transform: rotateY(180deg) translateZ(var(--cube-half-size));
}
.cube__face-right {
transform: rotateY(90deg) translateZ(var(--cube-half-size));
}
.cube__face-left {
transform: rotateY(-90deg) translateZ(var(--cube-half-size));
}
.cube__face-top {
transform: rotateX(90deg) translateZ(var(--cube-half-size));
}
.cube__face-bottom {
transform: rotateX(-90deg) translateZ(var(--cube-half-size));
}
.backface-hidden {
backface-visibility: hidden;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.face--select-disabled {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.transition-transform {
transition: transform 0.3s ease;
}