Skip to content

Commit aad24fb

Browse files
dumartinssumn2u
authored andcommitted
fixed responsiveness issue
1 parent d1f36ea commit aad24fb

1 file changed

Lines changed: 30 additions & 18 deletions

File tree

examples/Live-Digital-Clock/styles.css

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,30 @@ body {
4545
}
4646

4747
.subtitle {
48+
margin-top: 20px;
49+
margin-bottom: 30px;
4850
color: #6b7280;
4951
font-size: 0.93rem;
5052
line-height: 1.5;
5153
}
5254

53-
.clock-face {
54-
background: #f4f6fb;
55-
border-radius: 12px;
56-
padding: 20px;
57-
border: 1px solid #e4e7ee;
58-
}
59-
6055
.time-row {
6156
display: flex;
6257
align-items: center;
6358
justify-content: center;
64-
gap: 12px;
65-
flex-wrap: wrap;
59+
gap: 10px;
60+
flex-wrap: nowrap;
61+
width: 100%;
6662
}
6763

6864
.time-block {
6965
text-align: center;
7066
background: #ffffff;
7167
border-radius: 10px;
72-
padding: 12px 10px;
68+
padding: 10px 8px;
7369
border: 1px solid #e4e7ee;
74-
min-width: 110px;
70+
flex: 1 1 0;
71+
min-width: 0;
7572
}
7673

7774
.label {
@@ -83,17 +80,17 @@ body {
8380

8481
.value {
8582
display: inline-block;
86-
font-size: clamp(2.4rem, 4vw, 3.2rem);
83+
font-size: clamp(2rem, 5vw, 2.6rem);
8784
font-weight: 700;
8885
letter-spacing: 0.04em;
8986
}
9087

9188
.colon {
9289
text-align: center;
93-
font-size: clamp(2.4rem, 4vw, 3.2rem);
90+
font-size: clamp(2rem, 5vw, 2.4rem);
9491
font-weight: 700;
9592
color: #2563eb;
96-
padding: 0 4px;
93+
padding: 0 3px;
9794
}
9895

9996
.ampm {
@@ -105,6 +102,7 @@ body {
105102
font-weight: 600;
106103
border: 1px solid #d6e5ff;
107104
letter-spacing: 0.05em;
105+
flex: 0 1 auto;
108106
}
109107

110108
.controls {
@@ -149,16 +147,30 @@ body {
149147
}
150148

151149
.time-row {
152-
flex-direction: column;
153-
gap: 10px;
150+
flex-wrap: nowrap;
151+
gap: 6px;
152+
}
153+
154+
.time-block {
155+
min-width: 0;
156+
padding: 8px 6px;
157+
flex: 1 1 0;
158+
}
159+
160+
.value {
161+
font-size: clamp(1.6rem, 8vw, 2.1rem);
154162
}
155163

156164
.colon {
157-
display: none;
165+
font-size: clamp(1.6rem, 8vw, 2.1rem);
166+
padding: 0 2px;
158167
}
159168

160169
.ampm {
161-
width: 100%;
170+
width: auto;
162171
text-align: center;
172+
align-self: center;
173+
padding: 8px 10px;
174+
font-size: 0.85rem;
163175
}
164176
}

0 commit comments

Comments
 (0)