Fix the mobile menu writing white on white and the hero losing its gutter

Umut on Elektro Bernhard: "Menü im Mobil Dropdown textfarben sind weiß also
weiß auf weiß und Hero banner texte sind ohne abstand rechts links im mobil".
Both are core faults, not content - every site with a floating header and a
flex section had them.

The opened burger panel paints its own white surface but took its text colour
from the header. A header that hovers over a dark photo writes white, so the
menu was white on white until the page was scrolled and the header turned
light. The design area has settings for the burger button - text, surface,
border, corners, size - but none for the panel, so there was no way to fix
this from the editor. The panel now sets its own colour alongside its own
background.

The gutter was lost to "flex:1 1 auto" on .section-inner, added in 67b8575 so
a full height section could grow. Growing works along the main axis, and that
defaults to the row: the inner box grew sideways and pushed the container
gutter out. On the desktop the theme's maximum width stopped it before anyone
noticed; on a phone there is none, and the text sat hard against the edge
while the header and every other section kept their 18px. It is "flex:0 1
auto" now. The height never needed it - across the main axis a flex item
stretches anyway, and where "align-items: center" is set, the middle is what
was asked for.

Measured at 375px: hero content was x 0 / 375 wide, now x 18 / 339, the same
as the header. At 1440px nothing changes (x 93 / 1240). Checked against the
full screen hero template as well - edge to edge, 100dvh, content centred -
which renders as before.

579 PHP tests / 4798 assertions on 8.4 and 8.2, 35 JavaScript model tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-16 21:30:19 +02:00
1 parent 9e0365f841
commit 0ed4c83e41
1 file changed
+13 -4
+13 -4
View File
@@ -438,9 +438,14 @@ body.consent-open{padding-bottom:320px}
.kant .width-full>.section-inner{width:100%;max-width:none;margin-inline:0}
@media (max-width:767px){.kant .width-wide>.section-inner{width:calc(100% - 36px)}}
/* A section that is a flex container centres its content box; the inner container must then be
allowed to grow, or a full height section would show a strip in the middle. */
.block-section>.section-inner{flex:1 1 auto}
/* Ein Abschnitt, der ein Flex-Kasten ist, reiht seinen Inhaltskasten als Flex-Element ein.
Wachsen darf der dabei nicht: die Laufrichtung ist voreingestellt die Zeile, und dort frisst
das Wachsen die Randluft des Containers. Auf dem Telefon stand der Text eines Hero-Abschnitts
damit hart an der Kante, waehrend Kopf und alle uebrigen Abschnitte ihre 18 px hatten - am
Schreibtisch fiel es nicht auf, weil dort die Hoechstbreite des Designs vorher bremst.
Die Hoehe braucht das Wachsen nicht: quer zur Laufrichtung dehnt sich ein Flex-Element
ohnehin ueber die volle Hoehe, und steht "Ausrichtung: Mitte", ist die Mitte gewollt. */
.block-section>.section-inner{flex:0 1 auto}
/* Menu kinds. Horizontal is the default; vertical stacks; burger is a details element, so it
opens without a script - a menu that needs one would not open on a page that runs none. */
@@ -472,9 +477,13 @@ body.consent-open{padding-bottom:320px}
weder faerben noch abschalten. Linie und Schatten kommen dann aus Rahmen und Wirkung. */
.site-header.is-sticky.has-own-surface{background:transparent;box-shadow:none}
.site-header .menu-burger[open]>summary{border-radius:8px}
/* Die Flaeche malt ihren eigenen Untergrund, also setzt sie auch ihre eigene Schriftfarbe.
Ohne das erbte sie die Farbe des Kopfbereichs: bei einem Kopf, der ueber einem dunklen Bild
schwebt und deshalb weiss schreibt, stand das aufgeklappte Menue weiss auf weiss. */
.site-header .menu-burger-body{position:absolute;left:0;right:0;top:100%;z-index:30;
padding:15px max(16px,calc((100% - var(--k-container,1180px)) / 2 + 16px)) 25px;
background:var(--paper);box-shadow:0 15px 25px color-mix(in srgb,var(--ink) 12%,transparent)}
background:var(--paper);color:var(--ink);
box-shadow:0 15px 25px color-mix(in srgb,var(--ink) 12%,transparent)}
.site-header .menu-burger-body .menu-list{gap:0}
.site-header .menu-burger-body .menu-list a{padding:12px 10px;font-size:16px}
/* Visibility never overwrites the block's grid/flex/display settings. */