-
Notifications
You must be signed in to change notification settings - Fork 0
/
count-down.css
171 lines (147 loc) · 3.59 KB
/
count-down.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Text:wght@400;500;700&display=swap');
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
:root {
--grayish-blue: hsl(237, 18%, 59%);
--soft-red: hsl(345, 95%, 68%);
--white: hsl(0, 0%, 100%);
--dark-desaturated-blue: hsl(236, 21%, 26%);
--very-dark-blue: hsl(235, 16%, 14%);
--darker-blue: hsl(234, 17%, 12%);
}
body {
font-family: 'Red Hat Text', sans-serif;
height: 100vh;
background-color: rgba(0, 0, 0, 0.906);
/* background-repeat: no-repeat; */
background-size: cover;
background-position: center;
color: var(--white);
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
}
.container {
text-align: center;
padding-inline: 1rem;
max-width: 1400px;
}
.countdown-container h1 {
font-size: 1.5rem;
text-transform: uppercase;
letter-spacing: 3px;
margin-bottom: 2rem;
}
.countdown {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
gap: 1rem;
}
.countdown .title {
position: relative;
background-color: #2c2c44;
border-radius: 0.3rem;
box-shadow: 0 4px rgba(0, 0, 0, 0.5);
margin-bottom: 1.3rem;
width: 70px;
height: 70px;
flex-shrink: 0;
}
/* central dividing line */
.countdown .title::after {
content: '';
position: absolute;
top: 50%;
left: 0;
height: 1px;
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
}
.countdown .title h2 {
color: #e100ffb7;
font-size: 1.7rem;
line-height: 70px;
position: relative;
overflow: hidden;
z-index: 1;
}
.countdown .title h2::before {
content: '';
position: absolute;
top: 43%;
left: -5px;
width: 9px;
height: 9px;
background-color: var(--darker-blue);
border-radius: 50%;
z-index: 1;
}
.countdown .title h2::after {
content: '';
position: absolute;
top: 43%;
right: -5px;
width: 9px;
height: 9px;
background-color: var(--darker-blue);
border-radius: 50%;
z-index: 1;
}
.countdown .count:not(:last-child) {
margin-right: 1rem;
}
.countdown .count p {
text-transform: uppercase;
letter-spacing: 3px;
font-size: 0.7rem;
color: var(--grayish-blue);
font-weight: 500;
}
/* Media Query for tablets (768px and below) */
@media (max-width: 768px) {
.countdown-container h1 {
font-size: 1.2rem;
/* Decreased font size for smaller screens */
}
.countdown .title {
width: 60px;
/* Reduced size of countdown boxes */
height: 60px;
}
.countdown .title h2 {
font-size: 1.5rem;
/* Adjusted font size within countdown boxes */
line-height: 60px;
}
.countdown .count p {
font-size: 0.6rem;
/* Decreased size for text labels */
}
}
/* Media Query for mobile devices (480px and below) */
@media (max-width: 480px) {
.countdown-container h1 {
font-size: 1rem;
/* Further reduced font size for very small screens */
}
.countdown .title {
width: 50px;
/* Further reduced size of countdown boxes */
height: 50px;
}
.countdown .title h2 {
font-size: 1.3rem;
/* Adjusted font size for countdown numbers */
line-height: 50px;
}
.countdown .count p {
font-size: 0.5rem;
/* Adjusted text size to ensure readability */
}
}