-
Notifications
You must be signed in to change notification settings - Fork 7
/
styles.css
109 lines (94 loc) · 1.99 KB
/
styles.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
/* INITIALIZATIONS */
* {
font-family: 'Quicksand';
color: white;
}
body {
display: flex;
align-items: center;
justify-content: center;
/* fallback gradient in case JavaScript does not load */
background: linear-gradient(-45deg, #B9E49F, #3DA597, #00617A, #003F5F);
background-size: 400% 400%;
/* fallback animation in case JavaScript does not load */
animation: gradient 8s ease infinite;
height: auto;
}
/* GLASS OVERLAY */
.glass {
width: 50rem;
height: 30rem;
padding: 1.2rem;
box-shadow: 0 0 1rem 0 rgba(0,0,0,0.2);
border-radius: 0.75rem;
background-color: rgba(255,255,255,0.15);
backdrop-filter: blur(0.7rem);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
/* GREETING MESSAGE ON GLASS OVERLAY */
#greeting {
border: 1.2rem;
font-size: 2rem;
}
/* CLOCK ON GLASS OVERLAY */
#clock {
text-align: center;
display: flex;
align-items: center;
}
#hour {
font-size: 12rem;
}
#minute {
font-size: 5rem;
}
#timeSuffix {
font-size: 1.4rem;
}
/* PROMPT ON GLASS OVERLAY */
#question {
font-size: 1.5rem;
}
/* ICONS ON GLASS OVERLAY */
.icons {
font-size: 3rem;
cursor: pointer;
}
.icons ul {
padding: 0;
margin: 1.2rem;
width: 25rem;
display: flex;
justify-content: space-evenly;
align-items: center;
list-style-type: none;
}
i {
transition: transform 0.3s;
}
i::after { /* this removes unneccesary icon leftovers that may come from the FontAwesome CDN */
display: none;
}
/* HOVER STATES */
i:hover {
transform: scale(1.2);
}
i:not(:hover) { /* this ensures smooth transform animation when mouse pointer leaves the hover state */
transform: scale(1);
transition-duration: 0.40s;
}
/* BACKGROUND ANIMATION */
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}