-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
103 lines (93 loc) · 2.01 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
* {
margin: 0;
padding: 0;
font-size: 62.5%;
box-sizing: border-box;
transition: all 2s;
}
.container {
--background: #f1f1f1;
--clock-background: white;
--shadow-color: gray;
--second-hand: red;
--hands: black;
--dot: white;
}
.container.dark-mode {
--background: #1f1d36;
--clock-background: black;
--shadow-color: antiquewhite;
--second-hand: red;
--hands: white;
--dot: black;
}
.container {
background-color: var(--background);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
}
.clock {
position: relative;
display: block;
height: 30rem;
width: 30rem;
background: var(--clock-background);
border-radius: 50%;
border: 0.5rem solid var(--clock-background);
box-shadow: inset 0.2rem 0.3rem 0.8rem 0 var(--shadow-color);
transform: rotate(180deg);
}
.hand {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
animation: none;
}
.second {
width: 0;
transform-origin: top;
border: 3px var(--second-hand) solid;
height: 40%;
border-radius: 0.2rem;
box-shadow: 0 0.5rem 3rem gray;
animation: none;
}
.minute {
width: 0;
border-radius: 0.2rem;
background-color: var(--hands);
transform-origin: top;
border: 2px var(--hands) solid;
height: 45%;
box-shadow: 0 0.5rem 3rem var(--shadow-color);
}
.hour {
border-radius: 0.2rem;
width: 0;
background-color: var(--hands);
transform-origin: top;
border: 3px var(--hands) solid;
height: 30%;
transform: rotate(90deg);
box-shadow: 0 0.5rem 3rem var(--shadow-color);
}
.dot {
width: 2rem;
height: 2rem;
border-radius: 50%;
background-color: var(--clock-background);
box-shadow: inset 0 0 0.8rem var(--shadow-color);
}
.toggle {
font-size: 2rem;
margin-top: 5rem;
padding: 1rem;
border: 2px var(--hands) solid;
border-radius: 0.3rem;
background: var(--clock-background);
color: var(--hands);
}