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:
1 parent
e0a3fdbb70
commit
67614158e4
23 files changed
+1110
-111
No files matched your search
@@ -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); }
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ .lf-hero {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
min-inline-size: 0;
|
||||
min-block-size: 32rem;
|
||||
min-block-size: calc(var(--ds-media) * 1.2 * var(--dens) / 16 * 1rem);
|
||||
max-inline-size: 100%;
|
||||
border-radius: clamp(1rem, 1.9cqi, 1.75rem);
|
||||
background: var(--lf-hero-cream);
|
||||
@@ -32,9 +32,10 @@ .lf-hero {
|
||||
font-family: var(--lf-font-display);
|
||||
}
|
||||
|
||||
.lf-hero--height-compact { min-block-size: 25rem; }
|
||||
.lf-hero--height-normal { min-block-size: 32rem; }
|
||||
.lf-hero--height-large { min-block-size: 40rem; }
|
||||
/* Mindesthöhen kommen aus der Mediengröße und der Dichtestufe (--dens, tokens.css): kompakt 0,9 ×, normal 1,2 ×, groß 1,56 × --ds-media. */
|
||||
.lf-hero--height-compact,
|
||||
.lf-hero--height-normal,
|
||||
.lf-hero--height-large { min-block-size: calc(var(--ds-media) * 1.2 * var(--dens) / 16 * 1rem); }
|
||||
|
||||
.lf-hero__photo {
|
||||
position: absolute;
|
||||
@@ -128,8 +129,8 @@ .lf-hero__inner {
|
||||
max-inline-size: 1440px;
|
||||
min-inline-size: 0;
|
||||
margin-inline: auto;
|
||||
padding: clamp(1.8rem, 4.3cqi, 5rem);
|
||||
padding-block: clamp(2.1rem, 5cqi, 5rem);
|
||||
padding: clamp(var(--pad-card), 3.4cqi, var(--pad-surface));
|
||||
padding-block: clamp(var(--pad-card), 3.4cqi, var(--pad-surface));
|
||||
}
|
||||
|
||||
.lf-hero__copy { position: relative; max-inline-size: min(660px, 58%); min-inline-size: 0; }
|
||||
@@ -151,7 +152,7 @@ .lf-hero__title {
|
||||
margin: 0.25em 0;
|
||||
color: inherit;
|
||||
font-family: inherit;
|
||||
font-size: clamp(2.1rem, 5.4cqi, 4.9rem);
|
||||
font-size: clamp(1.75rem, 4cqi, var(--text-display));
|
||||
line-height: 1.06;
|
||||
letter-spacing: -0.035em;
|
||||
font-weight: 900;
|
||||
@@ -184,7 +185,7 @@ .lf-hero__description {
|
||||
max-inline-size: 56ch;
|
||||
margin: 0 0 clamp(1.25rem, 2.1cqi, 2rem);
|
||||
font-family: var(--lf-font-ui);
|
||||
font-size: clamp(1.05rem, 1.7cqi, 1.3rem);
|
||||
font-size: clamp(1rem, 1.5cqi, var(--text-lede));
|
||||
line-height: 1.5;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
@@ -197,11 +198,11 @@ .lf-hero__button {
|
||||
justify-content: center;
|
||||
min-inline-size: 0;
|
||||
max-inline-size: 100%;
|
||||
min-block-size: 3rem;
|
||||
padding: 0.77rem 1.2rem;
|
||||
min-block-size: var(--touch-target);
|
||||
padding: 0.6rem 1.1rem;
|
||||
border: 2px solid transparent;
|
||||
border-radius: 999px;
|
||||
font: 800 0.96rem/1.28 var(--lf-font-ui);
|
||||
font: 800 var(--text-button)/1.28 var(--lf-font-ui);
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
white-space: normal;
|
||||
@@ -237,10 +238,10 @@ @container lf-hero (max-width: 859.99px) {
|
||||
.lf-hero__photo { position: relative; display: block; block-size: auto; aspect-ratio: 16 / 9; }
|
||||
.lf-hero__video { inset: 0 0 auto 0; block-size: auto; aspect-ratio: 16 / 9; border-radius: inherit; }
|
||||
.lf-hero--photo-split::before { display: none; }
|
||||
.lf-hero__inner { padding: clamp(1.2rem, 3.5cqi, 2rem); padding-block-end: 2.4rem; }
|
||||
.lf-hero__inner { padding: clamp(var(--pad-card), 3.5cqi, calc(var(--pad-card) * 1.6)); padding-block-end: calc(var(--pad-card) * 1.6); }
|
||||
.lf-hero__copy { max-inline-size: 100%; }
|
||||
.lf-hero__title { font-size: clamp(2rem, 5.5cqi, 3.1rem); }
|
||||
.lf-hero__description { font-size: 1.07rem; }
|
||||
.lf-hero__title { font-size: clamp(1.75rem, 5.5cqi, var(--text-display)); }
|
||||
.lf-hero__description { font-size: var(--text-lede); }
|
||||
.lf-hero--editorial-solid .lf-hero__copy { max-inline-size: 100%; }
|
||||
.lf-hero__rays { inset-block-start: -1.6rem; inset-inline-start: auto; inset-inline-end: 0; transform: rotate(10deg); }
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
* - Schriften und Farben ausschließlich über vorhandene Tokens (tokens.css); keine neuen Schriften.
|
||||
* - Die Karte hat ihre eigene helle Fläche und setzt dafür die hellen Bedeutungswerte, auch in dunklen Abschnitten.
|
||||
* - Kein line-clamp, keine feste Höhe: lange Titel und Texte brechen um.
|
||||
* - Größen aus der gemeinsamen Skala (ADR-44, tokens.css): Titel bis --text-h3 (breit --text-h2), Text --text-body,
|
||||
* Schaltfläche --text-button, Innenabstand --pad-card, Tafelhöhe aus dem Basisabstand.
|
||||
*/
|
||||
.lf-pc,
|
||||
.lf-pc * {
|
||||
@@ -40,7 +42,7 @@ .lf-pc {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-panel);
|
||||
box-shadow: var(--shadow-raised);
|
||||
font: 400 1rem/1.55 var(--font-reading);
|
||||
font: 400 var(--text-body)/1.55 var(--font-reading);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
@@ -104,7 +106,7 @@ .lf-pc__body {
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
min-inline-size: 0;
|
||||
padding: clamp(20px, 4.5cqi, 32px);
|
||||
padding: clamp(var(--pad-card), 3.4cqi, calc(var(--pad-card) * 1.4));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
@@ -120,7 +122,7 @@ .lf-pc__kind {
|
||||
.lf-pc .lf-pc__title {
|
||||
margin: 0;
|
||||
color: var(--color-heading);
|
||||
font: 800 clamp(1.35rem, 4.6cqi, 1.75rem) / 1.18 var(--font-display);
|
||||
font: 800 clamp(1.2rem, 4cqi, var(--text-h3)) / 1.18 var(--font-display);
|
||||
letter-spacing: -0.025em;
|
||||
text-wrap: balance;
|
||||
}
|
||||
@@ -175,7 +177,7 @@ .lf-pc__cta {
|
||||
background: var(--pc-action);
|
||||
color: var(--pc-action-text);
|
||||
font-weight: 600;
|
||||
font-size: 0.9375rem;
|
||||
font-size: var(--text-button);
|
||||
line-height: 1.4;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
@@ -216,16 +218,16 @@ .lf-pc__panel {
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
gap: 20px;
|
||||
min-block-size: 140px;
|
||||
min-block-size: calc(var(--ds-space) * 14 / 16 * 1rem);
|
||||
margin: 10px 10px 0;
|
||||
padding: 24px;
|
||||
padding: calc(var(--pad-card) * 1.2);
|
||||
border-radius: var(--radius-card);
|
||||
background: var(--lf-navy);
|
||||
color: var(--lf-white);
|
||||
}
|
||||
|
||||
.lf-pc__panel-label {
|
||||
font: 800 1.6rem / 1.15 var(--font-display);
|
||||
font: 800 calc(var(--text-h3) * 1.1) / 1.15 var(--font-display);
|
||||
}
|
||||
|
||||
.lf-pc__panel-accent {
|
||||
@@ -329,7 +331,7 @@ @container slot (min-width: 520px) {
|
||||
/* Neben dem Text wie ein Bild mittig, auch wenn die Karte auf Zeilenhöhe gestreckt ist. */
|
||||
.lf-pc:not(.lf-pc--stacked) .lf-pc__panel {
|
||||
margin: 10px 0 10px 10px;
|
||||
min-block-size: 220px;
|
||||
min-block-size: calc(var(--ds-space) * 20 / 16 * 1rem);
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
@@ -339,8 +341,8 @@ @container slot (min-width: 520px) {
|
||||
border-radius: var(--radius-card);
|
||||
}
|
||||
|
||||
.lf-pc__body { padding: clamp(22px, 4cqi, 36px); }
|
||||
.lf-pc .lf-pc__title { font-size: clamp(1.45rem, 3.4cqi, 2rem); }
|
||||
.lf-pc__body { padding: clamp(var(--pad-card), 3cqi, calc(var(--pad-card) * 1.4)); }
|
||||
.lf-pc .lf-pc__title { font-size: clamp(1.2rem, 3cqi, var(--text-h2)); }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
|
||||
Reference in new issue
Block a user