-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
130 lines (116 loc) · 3.43 KB
/
style.css
File metadata and controls
130 lines (116 loc) · 3.43 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
* { margin: 0; padding: 0; font-family: 'Poppins', sans-serif; box-sizing: border-box; }
body { background: #222; padding: 20px; }
.card {
width: 100%; max-width: 470px; background: linear-gradient(135deg, #00feba, #5b548a);
color: #fff; margin: 20px auto 0; border-radius: 20px; padding: 30px 20px; text-align: center;
}
.search { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.search input {
border: 0; outline: 0; background: #ebfffc; color: #555; padding: 10px 15px;
height: 50px; border-radius: 30px; flex: 1; min-width: 150px; font-size: 16px;
}
.search button {
border: 0; outline: 0; background: #ebfffc; border-radius: 50%; width: 50px; height: 50px; cursor: pointer;
display: flex; align-items: center; justify-content: center;
}
.search button img { width: 16px; }
.weather-icon { width: 120px; max-width: 100%; margin-top: 20px; }
.weather h1 { font-size: clamp(48px, 12vw, 80px); font-weight: 500; }
.weather h2 { font-size: clamp(32px, 8vw, 45px); font-weight: 400; margin-top: -10px; }
.details { display: flex; align-items: center; justify-content: space-around; padding: 0 10px; margin-top: 30px; flex-wrap: wrap; gap: 15px; }
.col { display: flex; align-items: center; text-align: left; }
.col img { width: 30px; margin-right: 10px; }
.humidity, .wind { font-size: clamp(18px, 4vw, 28px); margin-top: -6px; }
.weather { display: none; }
.error { text-align: left; margin-left: 10px; font-size: 14px; margin-top: 10px; display: none; }
*, *::before, *::after {
box-sizing: border-box;
}
body {
padding: 20px;
margin: 0;
}
.progress-bar {
display: none;
align-items: center;
width: 100%;
height: 3em;
background-color: #111;
border-radius: 1.5em;
color: white;
margin-top: 30px;
overflow: hidden;
position: relative;
}
.progress-bar::before {
content: attr(data-label);
display: flex;
align-items: center;
position: absolute;
left: 0;
width: calc(var(--width, 0) * 1%);
background-color: #0f6b67;
border-radius: 1em;
padding: 1em;
height: 100%;
}
.forecast {
margin-top: 30px;
text-align: left;
}
.forecast h3 {
font-size: clamp(14px, 4vw, 18px);
margin-bottom: 15px;
text-align: center;
}
.forecast-container {
display: flex;
gap: 10px;
overflow-x: auto;
padding: 10px 0;
}
.forecast-item {
background: rgba(255, 255, 255, 0.2);
border-radius: 10px;
padding: 12px;
min-width: 90px;
text-align: center;
flex-shrink: 0;
}
.forecast-item img {
width: 40px;
height: 40px;
margin: 8px auto;
}
.forecast-item p {
margin: 4px 0;
font-size: 11px;
}
.forecast-day {
font-weight: 500;
font-size: 12px;
}
.forecast-temp {
font-size: 14px;
font-weight: 500;
}
/* Tablet devices (768px and up) */
@media (min-width: 768px) {
body { padding: 40px; }
.card { padding: 40px 35px; margin-top: 50px; }
.search input { padding: 10px 25px; height: 60px; font-size: 18px; }
.search button { width: 60px; height: 60px; }
.weather-icon { width: 170px; margin-top: 30px; }
.details { padding: 0 20px; margin-top: 50px; }
.col img { width: 40px; }
.forecast h3 { font-size: 18px; }
.forecast-item { min-width: 100px; padding: 15px; }
.forecast-item img { width: 50px; height: 50px; margin: 10px auto; }
.forecast-item p { font-size: 12px; }
.forecast-day { font-size: 14px; }
.forecast-temp { font-size: 16px; }
}
/* Large devices (1024px and up) */
@media (min-width: 1024px) {
.card { max-width: 550px; }
}