-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathyes.css
More file actions
136 lines (121 loc) · 2.47 KB
/
yes.css
File metadata and controls
136 lines (121 loc) · 2.47 KB
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
125
126
127
128
129
130
131
132
133
134
135
136
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
min-height: 100vh;
display: grid;
place-items: center;
overflow-x: hidden; /* Allow vertical scrolling if needed */
font-family: sans-serif;
background-color: rgb(1, 1, 1);
background-image: linear-gradient(#ffe5e5);
color: white;
transition: background-color 500ms ease;
}
/* Header */
header {
position: absolute;
z-index: 999;
text-align: center;
top: 0rem;
text-decoration: aquamarine;
padding: 1rem;
background: inherit;
}
/* Fixing Container for Mobile */
.container {
position: relative;
width: min(400px, 100%);
max-width: 100vw; /* Ensure it doesn't exceed screen width */
margin: auto;
padding: 20px; /* Add some padding for spacing */
}
/* List Items */
ul {
list-style: none;
width: 80%;
height: 80%;
position: relative;
perspective: 5000px;
transform-style: preserve-3d;
}
ul > li {
position: absolute;
left: 50%;
top: calc(50% - 1.2rem);
--rotateX: calc(
1deg * var(--rotateDegrees) * calc(var(--day_idx) - var(--currentDay))
);
transform: rotateX(var(--rotateX)) translateZ(190px) translateX(-50%)
scale(var(--scale, 1));
--hue: calc(var(--rotateDegrees) * var(--day_idx));
background-color: hsl(var(--hue), 50%, var(--lightness, 50%));
width: 115%;
color: white;
display: grid;
grid-template-columns: 2.5rem auto;
height: 1.4rem;
transition: transform 900ms ease, background-color 900ms ease;
}
ul > li.active {
--lightness: 30%;
--scale: 1.1;
}
ul > li > * {
display: grid;
align-items: center;
}
li > time {
text-align: center;
}
li > span {
padding-inline-start: 0.5rem;
color: white;
}
/* Fix Controls for Mobile */
.controls {
position: absolute;
top: 50%;
left: 100%; /* Adjusted to avoid overflow */
transform: translateY(-50%);
display: flex;
flex-direction: column;
gap: 0.125rem;
}
/* Responsive Fix for Controls */
@media (max-width: 500px) {
.controls {
left: auto;
right: 0;
transform: translateY(-50%);
}
}
.controls button {
width: 1.5rem;
aspect-ratio: 1;
font-size: 1.5rem;
color: rgb(106, 245, 25);
border: none;
background: pink;
display: flex;
place-items: center;
}
.controls button:hover,
.controls button:focus {
background: red;
}
.controls button:active {
transform: scale(1.1);
}
/* Border */
.border {
width: 96%;
height: 3em;
border: 1px solid white;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}