Vereinfache die Abschnittsabstände auf oben, unten und Widget-Abstand.
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:
1 parent
f4d225d0b2
commit
f511ad10de
10 files changed
+238
-94
No files matched your search
+25
-28
@@ -13,40 +13,37 @@ .page-sections {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Abstände (Hülle Version 2): genau drei Werte je Abschnitt, keine weitere Vorgabe aus Seiten- oder Rasterhüllen.
|
||||
* - oben/unten: Innenabstand des Abschnitts; zwischen zwei Abschnitten addieren sich „unten“ und „oben“ (0 + 0 = 0).
|
||||
* Bei eigener Fläche liegen beide innerhalb der Fläche, damit Hintergründe nahtlos anschließen.
|
||||
* - Widget-Abstand: Abstand zwischen den Plätzen des Rasters, nebeneinander und gestapelt.
|
||||
* Abstände innerhalb eines Widgets (zum Beispiel zwischen Karten) bleiben im Widget (--grid-gap).
|
||||
*/
|
||||
.page-section {
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
background: var(--color-surface);
|
||||
color: var(--color-text);
|
||||
padding-block: var(--section-space);
|
||||
--section-space: clamp(3rem, 2rem + 4vw, 6rem);
|
||||
padding-top: var(--section-space-top);
|
||||
padding-bottom: var(--section-space-bottom);
|
||||
--section-space-top: var(--section-space-compact);
|
||||
--section-space-bottom: var(--section-space-compact);
|
||||
--section-gap: var(--section-gap-normal);
|
||||
}
|
||||
|
||||
.section-space-compact {
|
||||
--section-space: clamp(1.5rem, 1rem + 2vw, 3rem);
|
||||
}
|
||||
|
||||
.section-space-large {
|
||||
--section-space: clamp(4.5rem, 3rem + 5vw, 8rem);
|
||||
}
|
||||
|
||||
/* Abweichender Abstand oben (Abschnittsgestaltung „Abstand oben“); der Abstand unten folgt weiter --section-space. */
|
||||
.page-section.section-space-top-small {
|
||||
padding-top: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
|
||||
}
|
||||
|
||||
.page-section.section-space-top-none {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
/* Aufeinanderfolgende Abschnitte ohne eigene Fläche teilen sich den Abstand, statt ihn zu verdoppeln. */
|
||||
.section-bg-default + .section-bg-default {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.section-divider-space {
|
||||
margin-bottom: var(--section-space);
|
||||
}
|
||||
.section-space-top-none { --section-space-top: var(--section-space-none); }
|
||||
.section-space-top-compact { --section-space-top: var(--section-space-compact); }
|
||||
.section-space-top-normal { --section-space-top: var(--section-space-normal); }
|
||||
.section-space-top-large { --section-space-top: var(--section-space-large); }
|
||||
.section-space-bottom-none { --section-space-bottom: var(--section-space-none); }
|
||||
.section-space-bottom-compact { --section-space-bottom: var(--section-space-compact); }
|
||||
.section-space-bottom-normal { --section-space-bottom: var(--section-space-normal); }
|
||||
.section-space-bottom-large { --section-space-bottom: var(--section-space-large); }
|
||||
.section-gap-none { --section-gap: var(--section-gap-none); }
|
||||
.section-gap-compact { --section-gap: var(--section-gap-compact); }
|
||||
.section-gap-normal { --section-gap: var(--section-gap-normal); }
|
||||
.section-gap-large { --section-gap: var(--section-gap-large); }
|
||||
|
||||
.page-section-inner {
|
||||
position: relative;
|
||||
@@ -72,7 +69,7 @@ .section-width-full .page-section-inner {
|
||||
|
||||
.section-grid {
|
||||
display: grid;
|
||||
gap: var(--grid-gap);
|
||||
gap: var(--section-gap);
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user