Files
laraundfelix/resources/css/widgets.css
T
LarsandClaude Opus 5.5 0bfb53463a
CI Feature / test (push) Successful in 41s
Deploy Test / test (push) Successful in 37s
Deploy Test / deploy (push) Successful in 33s
Führe einen gemeinsamen Layoutvertrag ein und integriere die Premium-Widgets.
Layoutvertrag (ADR-38) in der bestehenden Registry: Jede Widget-Art
erklärt zulässige Rasterbreiten (supportedUnits), Höhen aus einem
gemeinsamen Vokabular (heights, gespeichert als settings.height),
Darstellungsmodi und Verhalten bei wenig Platz. Unzulässige Breiten
werden beim Speichern verständlich abgewiesen; Höhe „fill“ streckt
den Handlungsaufruf auf die Abschnittszeile.

Premium-Widgets nach Brand-UI-Kit v1.6:
- hero Version 2: photo_split/editorial_solid, Höhen compact/normal/
  large, Label, Überschriftenebene, Akzent, Bildfokus in Prozent, zwei
  Schaltflächen; nur 3 oder 4 Einheiten. Upgrade aus Version 1.
- image_text Version 3: Fläche cream/clear/navy, Höhen compact/normal/
  spacious, Label, zwei Schaltflächen, Bildfokus; 1 bis 4 Einheiten.
  Upgrade aus Version 2 (format entfällt, Fokus in Prozent).
- Kit-CSS ersetzt das bisherige Hero- und Bild-und-Text-CSS; der
  Randlos-Mechanismus der Designiteration 1 entfällt.

Editor: Reiter Inhalt/Medien/Darstellung aus der Registry, Auswahl-
knöpfe mit Symbolen, Schieberegler für den Bildfokus und eine Live-
Vorschau im Dialog mit demselben Renderer in wählbarer Platzbreite.

Tests bewusst angepasst: Einstieg braucht jetzt 3 oder 4 Einheiten
(vorher Mindestbreite 2), image_text ist Version 3, Klassen der neuen
Ansichten; die Hero-/Bild-Tests der Designiteration 1 sind durch
CmsPremiumWidgetsTest ersetzt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:20:09 +01:00

468 lines
11 KiB
CSS

/*
* Widget-Ansichten der Bestandswidgets. Jede Regel verwendet Bedeutungswerte und richtet sich nach der Slotbreite
* (Container „slot“), nicht nach dem Fenster. Markenakzente (Unterstreichung, Strahlen) stammen aus
* resources/views/components/brand und sind dekorativ.
*/
.widget {
min-width: 0;
color: var(--color-text);
overflow-wrap: break-word;
}
/*
* Gemeinsamer Layoutvertrag (ADR-38): Höhe „fill“ streckt das Widget auf die Höhe der Abschnittszeile, wenn Plätze
* nebeneinander stehen. Gestapelt (schmaler Abschnitt) entspricht das der Inhaltshöhe. Inhalte werden nie begrenzt.
*/
.section-slot:has(> .widget-height-fill) {
align-self: stretch;
display: flex;
flex-direction: column;
}
.section-slot > .widget-height-fill {
flex: 1 1 auto;
display: flex;
flex-direction: column;
}
.widget-height-fill > .cta {
flex: 1 1 auto;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
}
.widget > :last-child,
.widget .prose > :last-child {
margin-bottom: 0;
}
/* Überschrift */
.widget-heading h1,
.widget-heading h2 {
max-width: 22ch;
}
/* Fließtext */
.widget-prose .prose p {
margin: 0 0 var(--space-4);
}
/* ------------------------------------------------------------------------------------------------
* Redaktionelle Karten. Varianten: Raster (cards-grid), kompakte Liste (cards-compact),
* erste Karte hervorgehoben (cards-featured). Die ganze Karte ist über den Titellink klickbar.
* ---------------------------------------------------------------------------------------------- */
.cards {
--card-surface: var(--lf-cream);
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
gap: var(--grid-gap);
list-style: none;
padding: 0;
margin: 0;
}
.section-bg-light .cards,
.scope-dark .cards,
.scope-accent .cards,
.section-bg-image .cards {
--card-surface: var(--lf-white);
}
.card {
position: relative;
display: flex;
flex-direction: column;
background: var(--card-surface);
border-radius: var(--radius-card);
overflow: hidden;
color: var(--lf-ink);
--color-text: var(--lf-ink);
--color-text-muted: var(--lf-ink-muted);
--color-heading: var(--lf-navy);
--color-link: var(--lf-navy);
--color-focus: var(--lf-focus);
}
.card-media {
aspect-ratio: 3 / 2;
overflow: hidden;
background: var(--lf-green-tint);
}
.card-image {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.card-body {
display: grid;
gap: var(--space-2);
padding: var(--space-5);
}
.card-title {
font-size: clamp(1.1875rem, 1.1rem + 0.4cqi, 1.375rem);
line-height: 1.2;
margin: 0;
}
.card-title a {
color: inherit;
text-decoration: none;
}
/* Gestreckter Link: die ganze Karte ist klickbar, ein einziger Tabstopp. */
.card-title a::after {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
}
.card-linked:hover .card-title a {
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 0.2em;
}
.card-linked:has(a:focus-visible) {
outline: 3px solid var(--color-focus);
outline-offset: 3px;
}
.card-title a:focus-visible {
outline: none;
}
.card p {
margin: 0;
color: var(--color-text-muted);
}
/* Karte ohne Bild: gelbe Markenkante oben. */
.cards-grid .card:not(.card-with-image),
.cards-featured .card:not(.card-with-image) {
box-shadow: inset 0 5px 0 var(--lf-yellow);
}
/* Hervorgehoben: Die erste Karte nimmt die ganze Zeile ein, ab 44rem Bild neben dem Text. */
.cards-featured .card-lead {
grid-column: 1 / -1;
}
.cards-featured .card-lead .card-title {
font-size: clamp(1.5rem, 1.1rem + 1.8cqi, 2.25rem);
}
.cards-featured .card-lead .card-body {
padding: clamp(1.5rem, 4cqi, 3rem);
align-content: center;
}
@container slot (min-width: 44rem) {
.cards-featured .card-lead.card-with-image {
display: grid;
grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.cards-featured .card-lead .card-media {
aspect-ratio: auto;
min-height: 20rem;
}
}
/* Kompakte Liste: redaktionelle Zeilen mit Trennlinie, Bild klein rechts. */
.cards-compact {
grid-template-columns: minmax(0, 1fr);
gap: 0;
}
.cards-compact .card {
flex-direction: row-reverse;
align-items: center;
gap: var(--space-4);
border-radius: 0;
background: transparent;
border-top: 1px solid var(--color-border);
color: var(--color-text);
--color-text: inherit;
--color-heading: inherit;
--color-link: inherit;
--color-text-muted: inherit;
overflow: visible;
}
.cards-compact .card:last-child {
border-bottom: 1px solid var(--color-border);
}
.cards-compact .card-body {
flex: 1;
padding: var(--space-4) 0;
}
.cards-compact .card p {
opacity: 0.88;
}
.cards-compact .card-media {
flex: none;
width: clamp(4.5rem, 18cqi, 6.5rem);
aspect-ratio: 1;
margin-block: var(--space-3);
border-radius: var(--radius-small);
}
/* ------------------------------------------------------------------------------------------------
* Programm- und Modulkarten. Inhalte aus den Fachdaten; die Markentafel trägt die Art (Programm, Modul).
* Stufen: schmal gestapelt; ab 40rem Slotbreite bei einer Karte Tafel neben dem Text; Liste in „compact“.
* ---------------------------------------------------------------------------------------------- */
.catalog-cards > h2 {
max-width: 22ch;
}
.catalog-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
gap: var(--grid-gap);
list-style: none;
padding: 0;
margin: var(--space-5) 0 0;
}
.catalog-cards > :first-child + .catalog-list,
.catalog-cards > .catalog-list:first-child {
margin-top: 0;
}
.catalog-card {
position: relative;
display: flex;
flex-direction: column;
background: var(--lf-white);
border: 1px solid var(--lf-line);
border-radius: var(--radius-card);
overflow: hidden;
color: var(--lf-ink);
--color-text: var(--lf-ink);
--color-text-muted: var(--lf-ink-muted);
--color-heading: var(--lf-navy);
--color-link: var(--lf-navy);
--color-focus: var(--lf-focus);
}
.catalog-card-visual {
position: relative;
display: flex;
align-items: flex-end;
min-height: 7rem;
padding: var(--space-4) var(--space-5);
background: var(--lf-navy);
border-bottom: 5px solid var(--lf-yellow);
}
/* Auf dunklen Flächen trägt Grün dunkel die Tafel, damit sie sich vom Abschnitt abhebt. */
.scope-dark .catalog-card-visual {
background: var(--lf-green-deep);
}
.catalog-card-visual span {
font-family: var(--font-display);
font-weight: 800;
font-size: 1.25rem;
color: var(--lf-white);
}
.catalog-card-rays {
position: absolute;
top: var(--space-4);
right: var(--space-5);
width: 2.75rem;
}
.catalog-card-body {
display: grid;
gap: var(--space-2);
align-content: start;
padding: var(--space-5);
}
.catalog-card-body h3 {
font-size: clamp(1.25rem, 1.15rem + 0.5cqi, 1.5rem);
line-height: 1.2;
margin: 0;
}
.catalog-card-body h3 a {
color: inherit;
text-decoration: none;
}
.catalog-card-linked h3 a::after {
content: '';
position: absolute;
inset: 0;
}
.catalog-card-linked:hover h3 a {
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 0.2em;
}
.catalog-card-linked:has(a:focus-visible) {
outline: 3px solid var(--color-focus);
outline-offset: 3px;
}
.catalog-card-linked h3 a:focus-visible {
outline: none;
}
.catalog-card-body p {
margin: 0;
color: var(--color-text-muted);
}
/* Die Art steht in der Tafel; für Hilfsmittel bleibt sie im Text erhalten. */
.catalog-cards-standard .catalog-card-kind {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
.catalog-card-kind {
font-size: var(--text-small);
font-weight: 700;
color: var(--lf-green-deep);
margin: 0;
}
.catalog-cards[data-count='1'] .catalog-list {
grid-template-columns: minmax(0, 1fr);
}
@container slot (min-width: 40rem) {
.catalog-cards-standard[data-count='1'] .catalog-card {
display: grid;
grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr);
}
.catalog-cards-standard[data-count='1'] .catalog-card-visual {
border-bottom: 0;
border-right: 5px solid var(--lf-yellow);
min-height: 11rem;
}
.catalog-cards-standard[data-count='1'] .catalog-card-body {
align-content: center;
padding: var(--space-6);
}
}
.catalog-cards-compact .catalog-list {
grid-template-columns: minmax(0, 1fr);
gap: 0;
}
.catalog-cards-compact .catalog-card {
border-width: 1px 0 0;
border-radius: 0;
background: transparent;
color: var(--color-text);
--color-text: inherit;
--color-text-muted: inherit;
--color-heading: inherit;
--color-link: inherit;
border-color: var(--color-border);
overflow: visible;
}
.catalog-cards-compact .catalog-card:last-child {
border-bottom-width: 1px;
}
.catalog-cards-compact .catalog-card-body {
padding: var(--space-4) 0;
gap: var(--space-1);
}
.catalog-cards-compact .catalog-card-kind {
color: inherit;
opacity: 0.85;
}
.catalog-card-internal {
border-style: dashed;
}
/* Handlungsaufruf */
.cta {
position: relative;
background: var(--color-surface-subtle);
border-radius: var(--radius-panel);
padding: clamp(1.5rem, 5cqi, 3rem);
color: var(--lf-ink);
--color-heading: var(--lf-navy);
--color-text: var(--lf-ink);
--color-link: var(--lf-navy);
--color-focus: var(--lf-focus);
--color-action: var(--lf-green-deep);
--color-action-hover: #2f6407;
--color-action-text: var(--lf-white);
}
.section-bg-light .cta {
background: var(--lf-white);
}
.cta h2 {
font-size: clamp(1.5rem, 1.1rem + 2cqi, 2.25rem);
}
.cta p {
max-width: var(--measure);
}
.cta a {
margin-top: var(--space-2);
}
@container slot (max-width: 20rem) {
.cta a {
width: 100%;
}
}
/* Häufige Fragen */
.faq {
margin: 0;
}
.faq dt {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.125rem;
color: var(--color-heading);
padding-top: var(--space-4);
border-top: 1px solid var(--color-border);
}
.faq dt:first-child {
border-top: 0;
padding-top: 0;
}
.faq dd {
margin: var(--space-2) 0 var(--space-4);
max-width: var(--measure);
}