Skip to content

Commit 5220d60

Browse files
committed
style: improve mobile and desktop user avatar styles; adjust flex properties and margins for better layout
1 parent 6d13e2c commit 5220d60

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

src/styles/responsive.css

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,19 @@
8888
margin-top: 0;
8989
margin-bottom: 0;
9090
display: flex;
91-
flex-direction: row; /* Orizzontale in mobile */
91+
flex-direction: row;
92+
/* Orizzontale in mobile */
9293
align-items: center;
9394
gap: 1rem;
94-
margin-left: auto; /* Spinge tutto a destra */
95+
margin-left: auto;
96+
/* Spinge tutto a destra */
9597
}
9698

9799
/* User avatar adjustments for mobile */
98100
.user-avatar-container {
99101
margin-bottom: 0;
100-
margin-left: 0; /* Reset, già gestito da sidebar-bottom */
102+
margin-left: 0;
103+
/* Reset, già gestito da sidebar-bottom */
101104
}
102105

103106
.user-avatar-btn {
@@ -226,7 +229,8 @@
226229
}
227230

228231
.sidebar-bottom {
229-
gap: 0.75rem; /* Ridotto per schermi piccoli */
232+
gap: 0.75rem;
233+
/* Ridotto per schermi piccoli */
230234
}
231235

232236
.sidebar-icon,
@@ -244,8 +248,8 @@
244248

245249
/* User avatar adjustments for extra small screens */
246250
.user-avatar-btn {
247-
width: 40px;
248-
height: 40px;
251+
width: 32px;
252+
height: 32px;
249253
}
250254

251255
body {

src/styles/sidebar.css

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
margin-top: auto;
4747
margin-bottom: 1rem;
4848
display: flex;
49-
flex-direction: column; /* Verticale su desktop */
49+
flex-direction: column;
50+
/* Verticale su desktop */
5051
align-items: center;
5152
gap: 1rem;
5253
}
@@ -198,14 +199,13 @@
198199
/* User Avatar Styles */
199200
.user-avatar-container {
200201
position: relative;
201-
margin-bottom: 16px;
202202
display: flex;
203203
justify-content: center;
204204
}
205205

206206
.user-avatar-btn {
207-
width: 48px;
208-
height: 48px;
207+
width: 42px;
208+
height: 42px;
209209
border-radius: 50%;
210210
overflow: hidden;
211211
border: 2px solid transparent;
@@ -254,7 +254,8 @@
254254
.user-dropdown {
255255
position: absolute;
256256
bottom: 0;
257-
left: 70px; /* Desktop: appare a destra */
257+
left: 70px;
258+
/* Desktop: appare a destra */
258259
width: 200px;
259260
background: var(--focus-bg);
260261
border: 1px solid color-mix(in srgb, var(--focus-timer-color) 20%, transparent);
@@ -270,6 +271,7 @@
270271
opacity: 0;
271272
transform: translateX(-10px) scale(0.95);
272273
}
274+
273275
to {
274276
opacity: 1;
275277
transform: translateX(0) scale(1);
@@ -279,17 +281,19 @@
279281
/* Mobile responsiveness */
280282
@media (max-width: 768px) {
281283
.user-dropdown {
282-
bottom: 60px; /* Mobile: sopra l'avatar */
284+
bottom: 60px;
285+
/* Mobile: sopra l'avatar */
283286
left: 50%;
284287
transform: translateX(-50%);
285288
animation: dropdownFadeInUp 0.2s ease-out;
286289
}
287-
290+
288291
@keyframes dropdownFadeInUp {
289292
from {
290293
opacity: 0;
291294
transform: translateX(-50%) translateY(10px) scale(0.95);
292295
}
296+
293297
to {
294298
opacity: 1;
295299
transform: translateX(-50%) translateY(0) scale(1);

0 commit comments

Comments
 (0)