Files
laraundfelix/resources/css/sections.css
LarsandClaude Opus 5.5 f511ad10de
CI Feature / test (push) Successful in 42s
Deploy Test / test (push) Successful in 37s
Deploy Test / deploy (push) Successful in 31s
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>
2026-11-18 12:39:57 +01:00

170 lines
4.9 KiB
CSS

/*
* Abschnitte des Seiteneditors (Seite → Abschnitte → Slots → Widgets).
* Gestaltung nur über Aufzählungswerte; jede Fläche setzt die Bedeutungswerte neu (tokens.css).
*
* Responsive Regeln (siehe SectionLayouts::columns):
* - Abschnitt unter 40rem: alle Slots untereinander in Slot-Reihenfolge.
* - 40 bis 60rem: gleich breite Slots nebeneinander, ungleiche untereinander.
* - ab 60rem: Verhältnis der Rastereinheiten.
* Jeder Slot ist ein eigener Container; Widgets richten sich nach der Slotbreite, nicht nach dem Fenster.
*/
.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-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-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;
z-index: 1;
width: min(var(--section-width), 100% - 2 * var(--gutter));
margin-inline: auto;
container-type: inline-size;
container-name: section;
--section-width: var(--container-standard);
}
.section-width-narrow .page-section-inner {
--section-width: var(--container-narrow);
}
.section-width-wide .page-section-inner {
--section-width: var(--container-wide);
}
.section-width-full .page-section-inner {
--section-width: 100%;
}
.section-grid {
display: grid;
gap: var(--section-gap);
grid-template-columns: minmax(0, 1fr);
align-items: start;
}
@container section (min-width: 40rem) {
.section-grid {
grid-template-columns: var(--section-cols-md, minmax(0, 1fr));
}
}
@container section (min-width: 60rem) {
.section-grid {
grid-template-columns: var(--section-cols-lg, minmax(0, 1fr));
}
}
.section-slot {
min-width: 0;
container-type: inline-size;
container-name: slot;
}
/* Flächen */
.section-bg-light {
--color-surface: var(--color-surface-subtle);
}
/* Dunkle Fläche und Markenakzent: Bedeutungswerte aus .scope-dark / .scope-accent (tokens.css). */
.section-bg-dark,
.section-bg-accent {
background: var(--color-surface);
}
/* Hintergrundbild mit Fokuspunkt (object-position) und Überlagerung für ausreichenden Kontrast. */
.section-bg-image {
--color-surface: var(--lf-navy);
overflow: hidden;
}
.page-section-image {
position: absolute;
inset: 0;
z-index: -2;
width: 100%;
height: 100%;
object-fit: cover;
}
.section-bg-image::before {
content: '';
position: absolute;
inset: 0;
z-index: -1;
pointer-events: none;
}
.section-overlay-light::before {
background: rgb(255 255 255 / 84%);
}
.section-overlay-dark::before {
background: rgb(3 37 81 / 78%);
}
/* Ohne Überlagerung bleibt die Schrift dunkel; geeignet für Widgets mit eigener heller Fläche. */
.section-overlay-none {
--color-surface: transparent;
}
/* Trenner zwischen Abschnitten */
.section-divider {
width: min(var(--container-standard), 100% - 2 * var(--gutter));
margin-inline: auto;
}
.section-divider-line {
padding-block: var(--space-5);
}
.section-divider-line span {
display: block;
border-top: 1px solid var(--lf-line);
}
.section-divider-accent {
display: flex;
justify-content: center;
padding-block: var(--space-2);
}
.section-divider-accent span {
display: block;
width: 4.5rem;
height: 5px;
border-radius: 5px;
background: var(--lf-yellow);
}