Skip to content

Commit dc56dce

Browse files
committed
fix(ui): uniform header title size on phones and untruncated subtitle
The list and map pages kept a 430px override (1.4rem) dating from the 'Playas de Cantabria' brand, so their title rendered smaller than the home page's on phones. And with the header logo, the home subtitle no longer fit at 0.8rem and got ellipsized. The title is now 1.6rem everywhere; on phones the logo cedes to 44px and the subtitle scales with the viewport (clamp), verified overflow-free at 412px and 360px.
1 parent ed3e484 commit dc56dce

4 files changed

Lines changed: 27 additions & 6 deletions

File tree

frontend/src/pages/HomePage.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@
6262
text-overflow: ellipsis;
6363
}
6464

65+
/* "Descubre las mejores playas de Cantabria" is the longest subtitle; with
66+
the header logo it no longer fit a phone at 0.8rem and got ellipsized.
67+
Scales with the viewport so it also survives 360px; below ~330px the
68+
ellipsis returns, which is the accepted degradation. */
69+
@media (max-width: 480px) {
70+
.hp-sticky-subtitle { font-size: clamp(0.6rem, 3vw - 0.05rem, 0.72rem); }
71+
}
72+
6573
/* La cabecera mide 84px fijos (`--playa-header-h`) y el contenido de todas las
6674
páginas se descuelga de ese número, así que el título no puede pasar de una
6775
línea. Pacifico es ancha, pero "Playucas.es" pide ~190px a 1.6rem y en un

frontend/src/pages/MapaPage.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@
4747
text-overflow: ellipsis;
4848
}
4949

50-
@media (max-width: 430px) {
51-
.mapa-sticky-title { font-size: 1.4rem; }
50+
/* Same title size as the other pages on phones — see PlayasList.css. */
51+
@media (max-width: 480px) {
52+
.mapa-sticky-subtitle { font-size: clamp(0.6rem, 3vw - 0.05rem, 0.72rem); }
5253
}
5354

5455
/* Alinea el título/selector con el contenedor de las demás páginas

frontend/src/pages/PlayasList.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@
5858
text-overflow: ellipsis;
5959
}
6060

61-
/* Misma razón que en la portada: la cabecera son 84px fijos, el título no
62-
puede pasar de una línea y en un móvil de 360px Pacifico a 1.6rem no cabe. */
63-
@media (max-width: 430px) {
64-
.home-sticky-title { font-size: 1.4rem; }
61+
/* The 430px title override (1.4rem) is gone: it dated from the "Playas de
62+
Cantabria" brand and made this page's title visibly smaller than the home
63+
page's on phones. "Playucas.es" at 1.6rem fits next to the header logo even
64+
at 360px; the subtitle cedes size instead (see LogoMarca.css). */
65+
@media (max-width: 480px) {
66+
.home-sticky-subtitle { font-size: clamp(0.6rem, 3vw - 0.05rem, 0.72rem); }
6567
}
6668

6769
/* --- Header hero area (banda bajo el header fijo) --- */

frontend/src/shared/ui/LogoMarca.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@
2222
flex: 1;
2323
min-width: 0;
2424
}
25+
26+
/* On phones the header row is tight: the logo cedes a few pixels so the
27+
subtitle can keep its full text (it also drops to 0.72rem, per page). */
28+
@media (max-width: 480px) {
29+
.marca-logo {
30+
width: 44px;
31+
height: 44px;
32+
border-radius: 10px;
33+
}
34+
}

0 commit comments

Comments
 (0)