Files
laraundfelix/resources/css/sections.css
T
LarsandClaude Sonnet 5.5 66f9275099
CI Feature / test (push) Successful in 7m19s
Deploy Test / test (push) Successful in 6m48s
Deploy Test / deploy (push) Successful in 39s
Lasse begrenzte Farbflächen bei kein Abstand ohne Lücke verschmelzen
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-30 11:11:07 +01:00

274 lines
9.0 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 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;
}
/*
* Leerer Platz des Rasters: Er hält seine Spalte frei, damit die Widgets daneben nicht nachrücken. Wo die Plätze
* untereinander stehen, erzeugt er keine Lücke und bleibt verborgen: auf dem Smartphone, in einem schmalen Abschnitt und
* auf dem Tablet bei Rastern mit ungleichen Plätzen (sie stapeln dort).
*/
.section-slot-empty {
display: none;
}
@container section (min-width: 60rem) {
.section-slot-empty {
display: block;
}
}
/* Tablet: gleich breite Plätze stehen nebeneinander, also behalten auch leere ihre Stelle. */
@container section (min-width: 40rem) {
.section-grid-tablet-columns > .section-slot-empty {
display: block;
}
}
/*
* Tablet, mehrere Zeilen (zum Beispiel 2 × 2): Eine Zeile, in der alle Plätze leer sind, entfällt, damit ihr Abstand keine
* Lücke lässt. Die Plätze danach rücken genau eine Zeile nach oben und bleiben in ihrer Spalte. Ab 60 rem steht alles in
* einer Zeile, dort bleibt jeder leere Platz stehen.
*/
@container section (min-width: 40rem) and (max-width: 59.99rem) {
.section-grid-tablet-columns > .section-slot-empty.section-slot-empty-row {
display: none;
}
}
/* 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);
}
/*
* Farbe aus der Palette (ADR-67): Hintergrund- und Schriftfarbe sowie die daraus abgeleiteten Bedeutungswerte stehen als
* Eigenschaften am Abschnitt (SectionRenderer). Bei dunkler Fläche kommt zusätzlich .scope-dark dazu, damit alle Bausteine,
* die sich daran anpassen (Karten, Symbole, Fließtext-Farben), unverändert greifen.
*/
.section-bg-palette {
background: var(--color-surface);
}
/* Tabellenkopf im Fließtext: eigene, vom Hintergrund abgeleitete Fläche statt der hellen Vorgabe. */
.section-bg-palette .prose-table th {
background: color-mix(in srgb, var(--color-text) 7%, var(--color-surface));
}
/*
* Breite der Fläche (ADR-67, „Hintergrundbreite: Auf Abschnittsbreite begrenzt“): Die Fläche folgt der gewählten
* Inhaltsbreite und steht zentriert; der Inhalt rückt nach innen, damit er nicht am Rand der Fläche klebt. Bei „Vollbreite“
* wird die Klasse nicht gesetzt. Ohne diese Klasse bleibt alles wie bisher: Die Fläche reicht über die volle Browserbreite.
*/
.section-bg-width-section {
--section-width: var(--container-standard);
width: min(var(--section-width), 100% - 2 * var(--gutter));
margin-inline: auto;
margin-block: var(--space-3);
border-radius: var(--radius-card);
overflow: clip;
}
/*
* Flächen verschmelzen: Steht eine begrenzte Fläche mit „Abstand unten: kein Abstand“ direkt vor einer Fläche mit
* „Abstand oben: kein Abstand“ (oder umgekehrt), fällt der Außenabstand der begrenzten Fläche an dieser Naht weg und ihre
* Ecken sind dort eckig. So bilden die Flächen einen Block statt zweier Kacheln mit Lücke. Ein Trenner zwischen den
* Abschnitten, ein Abstand ungleich „kein Abstand“ oder ein Abschnitt ohne eigene Fläche behalten die Lücke.
*/
.section-bg-width-section.section-space-bottom-none:has(+ :is(.section-bg-light, .section-bg-dark, .section-bg-accent, .section-bg-palette, .section-bg-image).section-space-top-none) {
margin-bottom: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
:is(.section-bg-light, .section-bg-dark, .section-bg-accent, .section-bg-palette, .section-bg-image).section-space-bottom-none + .section-bg-width-section.section-space-top-none {
margin-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.section-bg-width-section.section-width-narrow {
--section-width: var(--container-narrow);
}
.section-bg-width-section.section-width-wide {
--section-width: var(--container-wide);
}
.section-bg-width-section > .page-section-inner {
width: auto;
margin-inline: 0;
padding-inline: clamp(1rem, 4vw, 3rem);
}
/* 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);
}
/* Vorschau: Platzhalter für einen ausgeblendeten Abschnitt (die Website zeigt ihn nie). */
.section-hidden-note {
margin: var(--space-3, 0.75rem) auto;
max-inline-size: 60rem;
padding: 0.5rem 0.875rem;
border: 1px dashed currentColor;
border-radius: 0.5rem;
font-size: 0.875rem;
opacity: 0.7;
}