Führe eine konfigurierbare Größenskala für Website und Vorschau ein

Zehn Basiswerte (Fließtext, Überschriften, Abstände, Kopfzeile, Inhaltsbreite, Bildhöhe) leiten in tokens.css alle Größen ab. Einstieg, Bild und Text, Premium-Karten, Karten, Kopf, Fuß und Schaltflächen verwenden nur noch diese Tokens. Die Werte sind unter Website, Design, Größen einstellbar und wirken ohne Deployment über ein Inline-Stylesheet in Website, Mitgliederbereich-Layout und CMS-Vorschau. Lesen fällt bei fehlender Tabelle oder beschädigten Daten auf die Standardwerte zurück. Die Migration ist rein ergänzend.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
StommerandClaude Sonnet 5.5 committed 2026-11-22 14:54:14 +01:00
1 parent e0a3fdbb70
commit 67614158e4
23 files changed
+1110 -111

No files matched your search

+22 -22
View File
@@ -7,6 +7,9 @@
* - Oberfläche „clear“ übernimmt die Bedeutungswerte des Abschnitts (auch auf dunklen Abschnitten lesbar).
* - Überschrift erbt Farbe und Schrift (globale h1–h3-Regeln setzen sonst Navy).
* - Fokusfarbe aus den Tokens; Schriften über --lf-font-display und --lf-font-ui.
* - Größen aus der gemeinsamen Skala (ADR-44, tokens.css): Titel bis --text-h2, Text --text-body, Schaltflächen
* --text-button, Innenabstand --pad-card/--pad-surface, Bildhöhe --ds-media. Die Dichtestufe (--dens) bestimmt Bildhöhe,
* Abstand und Innenabstand der Varianten kompakt, normal und großzügig.
*/
.lf-bt-host { container: lf-bt / inline-size; inline-size: 100%; min-inline-size: 0; max-inline-size: 100%; }
.lf-bt-host, .lf-bt-host * { box-sizing: border-box; }
@@ -20,12 +23,13 @@ .lf-bt {
--bt-eyebrow: #295b08;
--bt-focus-x: 64%;
--bt-focus-y: 43%;
--bt-img-h: calc(var(--ds-media) * var(--dens) / 16 * 1rem);
--color-focus: var(--lf-focus);
display: grid;
grid-template-columns: minmax(0, 1fr);
align-items: start;
gap: clamp(0.9rem, 2.65cqi, 2rem);
padding: clamp(1rem, 2.8cqi, 3.25rem);
gap: calc(clamp(var(--space-3), 2.4cqi, var(--space-6)) * var(--dens));
padding: calc(clamp(var(--pad-card), 3cqi, var(--pad-surface)) * var(--dens));
border-radius: clamp(1rem, 1.8cqi, 1.65rem);
min-inline-size: 0;
max-inline-size: 100%;
@@ -82,7 +86,7 @@ .lf-bt__headline {
margin: 0;
color: inherit;
font-family: var(--lf-font-display);
font-size: clamp(1.55rem, 4.5cqi, 3.35rem);
font-size: clamp(1.4rem, 3.6cqi, var(--text-h2));
line-height: 1.14;
letter-spacing: -0.03em;
font-weight: 850;
@@ -101,7 +105,7 @@ .lf-bt__accent {
transform: rotate(-1deg);
}
.lf-bt__body { color: var(--bt-muted); font-size: clamp(0.97rem, 1.45cqi, 1.12rem); line-height: 1.62; overflow-wrap: anywhere; }
.lf-bt__body { color: var(--bt-muted); font-size: var(--text-body); line-height: 1.6; overflow-wrap: anywhere; }
.lf-bt__body > :first-child { margin-block-start: 0; }
.lf-bt__body > :last-child { margin-block-end: 0; }
.lf-bt__body p { margin: 0 0 0.9em; }
@@ -118,15 +122,15 @@ .lf-bt__button {
gap: 0.5rem;
max-inline-size: 100%;
min-inline-size: 0;
min-block-size: 2.95rem;
padding: 0.7rem 1rem;
min-block-size: var(--touch-target);
padding: 0.6rem 1rem;
background: var(--bt-green);
border: 2px solid var(--bt-green);
color: #fff;
border-radius: 999px;
text-decoration: none;
text-align: center;
font-size: 0.89rem;
font-size: var(--text-button);
font-weight: 800;
line-height: 1.33;
overflow-wrap: anywhere;
@@ -166,6 +170,8 @@ .lf-bt__image {
max-inline-size: none;
block-size: auto;
aspect-ratio: 16 / 10;
/* Nie höher als die Zielhöhe auf Desktop (Mediengröße × Dichtestufe); der Bildausschnitt folgt dem Fokuspunkt. */
max-block-size: var(--bt-img-h);
object-fit: cover;
object-position: var(--bt-focus-x) var(--bt-focus-y);
border-radius: clamp(0.78rem, 1.8cqi, 1.3rem);
@@ -174,28 +180,23 @@ .lf-bt__image {
.lf-bt--height-compact .lf-bt__image { aspect-ratio: 16 / 9; }
.lf-bt--height-spacious .lf-bt__image { aspect-ratio: 4 / 3; }
.lf-bt--height-compact { gap: clamp(0.75rem, 2cqi, 1.45rem); }
.lf-bt--height-spacious { gap: clamp(1.15rem, 3.4cqi, 2.7rem); }
.lf-bt--without-image { grid-template-columns: minmax(0, 1fr); }
/* Schmale Plätze: vollständiger Text und Links, keine erzwungene Höhe. */
@container lf-bt (max-width: 539.99px) {
.lf-bt__actions { display: grid; grid-template-columns: minmax(0, 1fr); }
.lf-bt__button { inline-size: 100%; }
.lf-bt__headline { font-size: clamp(1.42rem, 6.8cqi, 2.2rem); }
.lf-bt__headline { font-size: clamp(1.375rem, 6.8cqi, var(--text-h2)); }
.lf-bt__eyebrow { letter-spacing: 0.03em; }
}
/* Mittlere Containerbreite (meist zwei Einheiten): flacher Bildstreifen statt gequetschter Zweispaltigkeit. */
@container lf-bt (min-width: 540px) and (max-width: 899.99px) {
.lf-bt { gap: clamp(0.8rem, 1.6cqi, 1.2rem); padding: clamp(1.1rem, 2.4cqi, 1.65rem); }
.lf-bt--clear { padding-inline: 0; }
.lf-bt__media { inline-size: 100%; }
.lf-bt__image { aspect-ratio: 2.15 / 1; }
.lf-bt--height-compact .lf-bt__image { aspect-ratio: 2.5 / 1; }
.lf-bt--height-spacious .lf-bt__image { aspect-ratio: 1.8 / 1; }
.lf-bt__headline { font-size: clamp(1.65rem, 3.6cqi, 2.28rem); }
.lf-bt__body { font-size: 1.01rem; line-height: 1.59; }
.lf-bt__actions { margin-block-start: 0.95rem; }
.lf-bt__button { flex: 1 1 13rem; }
}
@@ -203,20 +204,19 @@ @container lf-bt (min-width: 540px) and (max-width: 899.99px) {
/* Breiter Container: zweispaltige Komposition, Bild links oder rechts. */
@container lf-bt (min-width: 900px) {
.lf-bt {
grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
align-items: center;
gap: clamp(1.8rem, 4cqi, 4.5rem);
padding: clamp(1.8rem, 4cqi, 4.5rem);
gap: calc(clamp(var(--space-5), 3cqi, var(--space-7)) * var(--dens));
}
.lf-bt--clear { padding-inline: 0; }
.lf-bt__media { order: 0; align-self: stretch; }
/*
* Bildhöhe = Zielhöhe (Mediengröße × Dichtestufe); sie wächst nur, wenn der Text höher ist. Das Bild füllt die
* Fläche und gibt keine eigene Höhe vor (unabhängig vom Seitenverhältnis der Datei); der Ausschnitt folgt dem Fokuspunkt.
*/
.lf-bt__media { order: 0; align-self: stretch; min-block-size: var(--bt-img-h); }
.lf-bt--image-left .lf-bt__media { order: -1; }
.lf-bt__image { block-size: 100%; min-block-size: 18rem; aspect-ratio: 4 / 3; }
.lf-bt--height-compact .lf-bt__image { min-block-size: 14rem; aspect-ratio: 3 / 2; }
.lf-bt--height-spacious .lf-bt__image { min-block-size: 24rem; aspect-ratio: 1 / 1; }
.lf-bt--height-compact { padding-block: clamp(1.25rem, 2.8cqi, 2.6rem); }
.lf-bt--height-spacious { padding-block: clamp(2.15rem, 4.5cqi, 4.75rem); }
.lf-bt__image { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; max-block-size: none; aspect-ratio: auto; }
.lf-bt--without-image { grid-template-columns: minmax(0, 1fr); }
}