-
Notifications
You must be signed in to change notification settings - Fork 0
/
clock.css
157 lines (145 loc) · 5.01 KB
/
clock.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
.material-symbols-outlined {
font-variation-settings:
'FILL' 0,
'wght' 400,
'GRAD' 0,
'opsz' 48
}
:root {
--red: #a31010;
--orange: #e67700;
--yellow: #ccff00;
--green: #00f545;
--ocean: #08d8ff;
--blue: #6161e5;
--darkblue: #0000ff;
--custom: #fff;
--glow-size: 15px;
--dots-glow-size: 3px;
--dim-opacity: 0.08;
}
body { background: black; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
#colors { display: flex; flex-flow: row nowrap; }
#colors > .color { cursor: pointer; }
#clock { white-space: nowrap; }
.color { width: 20px; height: 20px; margin-right: 8px; }
#colors .blue,
.field .blue { background-color: var(--blue); }
#colors .darkblue,
.field .darkblue { background-color: var(--darkblue); }
#colors .green,
.field .green { background-color: var(--green); }
#colors .yellow,
.field .yellow { background-color: var(--yellow); }
#colors .ocean,
.field .ocean { background-color: var(--ocean); }
#colors .red,
.field .red { background-color: var(--red); }
#colors .orange,
.field .orange { background-color: var(--orange); }
#colors .custom,
.field .custom { background-color: var(--custom); }
.field.blue { filter: drop-shadow(0 0 var(--glow-size) var(--blue)); }
.field.darkblue { filter: drop-shadow(0 0 var(--glow-size) var(--darkblue)); }
.field.green { filter: drop-shadow(0 0 var(--glow-size) var(--green)) }
.field.yellow { filter: drop-shadow(0 0 var(--glow-size) var(--yellow)); }
.field.ocean { filter: drop-shadow(0 0 var(--glow-size) var(--ocean)); }
.field.red { filter: drop-shadow(0 0 var(--glow-size) var(--red)); }
.field.orange { filter: drop-shadow(0 0 var(--glow-size) var(--orange)); }
.field.custom { filter: drop-shadow(0 0 var(--glow-size) var(--custom)); }
.dots.blue { filter: drop-shadow(0 0 var(--dots-glow-size) var(--blue)); }
.dots.darkblue { filter: drop-shadow(0 0 var(--dots-glow-size) var(--darkblue)); }
.dots.green { filter: drop-shadow(0 0 var(--dots-glow-size) var(--green)) }
.dots.yellow { filter: drop-shadow(0 0 var(--dots-glow-size) var(--yellow)); }
.dots.ocean { filter: drop-shadow(0 0 var(--dots-glow-size) var(--ocean)); }
.dots.red { filter: drop-shadow(0 0 var(--dots-glow-size) var(--red)); }
.dots.orange { filter: drop-shadow(0 0 var(--dots-glow-size) var(--orange)); }
.dots.custom { filter: drop-shadow(0 0 var(--dots-glow-size) var(--custom)); }
svg.field polygon { stroke: black; }
svg.field .blue { fill: var(--blue); }
svg.field .darkblue { fill: var(--darkblue); }
svg.field .green { fill: var(--green); }
svg.field .yellow { fill: var(--yellow); }
svg.field .ocean { fill: var(--ocean); }
svg.field .red { fill: var(--red); }
svg.field .orange { fill: var(--orange); }
svg.field .custom { fill: var(--custom); }
svg.field .lit { opacity: 1; animation: 0.5s fadeIn; }
svg.field .dim { opacity: var(--dim-opacity); }
/* .dots { opacity: 1; animation: fadeIn 0.5s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);} */
@keyframes fadeIn {
from { opacity: var(--dim-opacity); }
to { opacity: 1; }
}
#config {
position: absolute;
top: 20px;
left: 20px;
z-index: 1;
}
/* Pure CSS hamburger taken from https://codepen.io/erikterwan/pen/EVzeRP, MIT license */
#config > input[type=checkbox] {
display: block;
width: 40px;
height: 32px;
position: absolute;
top: -7px;
left: -5px;
cursor: pointer;
opacity: 0; /* hide this */
z-index: 2; /* and place it over the hamburger */
-webkit-touch-callout: none;
}
#config > span {
display: block;
width: 33px;
height: 4px;
margin-bottom: 5px;
position: relative;
background: #2c2c2c;
border-radius: 3px;
z-index: 1;
transform-origin: 4px 0px;
transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
opacity 0.55s ease;
}
#config > span:first-child { transform-origin: 0% 0%; }
#config > span:nth-last-child(2) { transform-origin: 0% 100%; }
#config > input[type=checkbox]:checked ~ span {
opacity: 1;
transform: rotate(45deg) translate(-2px, -1px);
}
#config > input[type=checkbox]:checked ~ span:nth-last-child(3) {
opacity: 0;
transform: rotate(0deg) scale(0.2, 0.2);
}
#config > input[type=checkbox]:checked ~ span:nth-last-child(2) {
transform: rotate(-45deg) translate(0, -1px);
}
#options {
position: absolute;
width: 300px;
margin-top: -136px;
margin-left: -17px;
padding: 50px;
padding-top: 125px;
-webkit-font-smoothing: antialiased;
/* to stop flickering of text in safari */
transform-origin: 0% 0%;
transform: translate(0, -1000%);
transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
background-color: black;
box-shadow: 0 0 8px 4px black
}
#config > input[type=checkbox]:checked ~ #options { transform: none }
#options > div {
border-bottom: 1px solid white;
padding: 8px;
display: flex;
justify-content: space-between;
}
i.material-symbols-outlined { color: white; padding-right: 8px;;}
#options fieldset { margin: 0; padding: 0; border: none; display: flex; }
#options fieldset > input { text-align: right; }
#options i { cursor: pointer; }