Vereinfache die Abschnittsabstände auf oben, unten und Widget-Abstand.
CI Feature / test (push) Successful in 42s
Deploy Test / test (push) Successful in 37s
Deploy Test / deploy (push) Successful in 31s

Die Abschnittshülle Version 2 kennt genau drei unabhängige Abstände mit
denselben Stufen (Kein Abstand, Kompakt, Normal, Großzügig):
- spacing_top / spacing_bottom: Innenabstand des Abschnitts; zwischen
  zwei Abschnitten addieren sich unten und oben (0 + 0 = 0).
- gap: Abstand zwischen den Plätzen des Rasters, nebeneinander und
  gestapelt. Widget-Innenabstände bleiben im Widget.

Entfallen sind „Abstand oben und unten“, die Abweichung „Abstand oben“
(same/small/none), die versteckte Regel, die oben zwischen zwei
Abschnitten ohne Fläche auf null setzte, und der Trenner „Zusätzlicher
Abstand“.

Hüllen der Version 1 werden beim Lesen ohne Layoutänderung übersetzt
(SectionStyle::migrateSpacing); gespeicherte Revisionen bleiben. Einzige
Abweichung: „Gering“ hat keine eigene Stufe mehr und wird „Kompakt“.

Tests bewusst angepasst (Hüllenversion 2, neue Klassen, Prüfung freier
Werte über die neuen Schlüssel); neue Tests für Addition, Vorgaben und
die Übersetzung aller Fälle der Version 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-18 12:39:57 +01:00
1 parent f4d225d0b2
commit f511ad10de
10 files changed
+238 -94

No files matched your search

+3 -2
View File
@@ -61,11 +61,12 @@ public function test_sections_render_grid_ratios_backgrounds_and_dividers(): voi
$html = $this->get('/raster')->assertOk()->getContent();
$this->assertStringContainsString('page-section section-bg-dark section-width-standard section-space-normal section-layout-u4 scope-dark', $html);
$this->assertStringContainsString('page-section section-bg-dark section-width-standard section-space-top-compact section-space-bottom-compact section-gap-normal section-layout-u4 scope-dark', $html);
$this->assertStringContainsString('section-bg-light section-width-wide', $html);
$this->assertStringContainsString('--section-cols-lg: minmax(0, 1fr) minmax(0, 3fr); --section-cols-md: minmax(0, 1fr)', $html);
$this->assertStringContainsString('--section-cols-md: repeat(2, minmax(0, 1fr))', $html, 'Vier gleiche Plätze stehen auf dem Tablet als 2 × 2.');
$this->assertStringContainsString('section-bg-accent section-width-standard section-space-large section-layout-u1-1-1-1 scope-accent', $html);
// Eingabe im Format der Version 1 („spacing“): oben und unten großzügig, Widget-Abstand wie bisher normal.
$this->assertStringContainsString('section-bg-accent section-width-standard section-space-top-large section-space-bottom-large section-gap-normal section-layout-u1-1-1-1 scope-accent', $html);
$this->assertStringContainsString('section-divider section-divider-accent', $html);
$this->assertSame(1, substr_count($html, 'section-divider section-divider-line'), 'Nach dem letzten Abschnitt steht kein Trenner.');
$this->assertSame(1, substr_count($html, '<h1>'), 'Nur das erste Widget der Seite ist Überschrift erster Ordnung.');