Files
laraundfelix/resources/css/widgets.css
LarsandClaude Sonnet 5.5 00b7ce9b3f
CI Feature / test (push) Canceled after 0s
Deploy Test / test (push) Successful in 6m21s
Deploy Test / deploy (push) Successful in 41s
Schreibe die Einleitung der Überschrift im Editor des Fließtexts
Das Widget Überschrift und Einleitung (jetzt Version 2) nimmt die Einleitung als formatierten Text: Absätze, Zeilenumbrüche, Auszeichnungen, Schriftgröße, -farbe und Ausrichtung wie im Fließtext. Die Regeln für .prose gelten auch für die Überschrift. Klartext der Version 1 wird beim Lesen zu Absätzen mit Zeilenumbrüchen angehoben. Drei Tests erwarteten das alte Markup der Einleitung und wurden bewusst angepasst.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-26 17:01:56 +01:00

611 lines
16 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 und Fließtext nutzen die ganze Breite des Platzes (Einstellung „Breite des Texts“, Vorgabe „Volle Breite“).
* Die Lesebreite („reading“) begrenzt Zeilen wie bisher: Überschrift 22 Zeichen, Einleitung und Fließtext --measure.
*/
.widget-heading .lede {
max-width: none;
}
.widget-heading .lede.lf-reading {
max-width: var(--measure);
}
:is(.widget-prose, .widget-heading) .prose {
max-width: none;
}
:is(.widget-prose, .widget-heading) .prose.prose--reading {
max-width: var(--measure);
}
/* Überschrift */
.widget-heading :is(h1, h2).lf-reading {
max-width: 22ch;
}
/* Fließtext */
:is(.widget-prose, .widget-heading) .prose p {
margin: 0 0 var(--space-4);
}
/*
* Fließtext aus dem Editor (ADR-50): Zwischenüberschriften H3 bis H6, Zitat und Tabellen. Nur Bedeutungswerte, damit der
* Text auch auf dunklen und Akzentflächen lesbar bleibt.
*/
:is(.widget-prose, .widget-heading) .prose h3,
:is(.widget-prose, .widget-heading) .prose h4,
:is(.widget-prose, .widget-heading) .prose h5,
:is(.widget-prose, .widget-heading) .prose h6 {
margin: var(--space-5) 0 var(--space-2);
font-family: var(--font-display);
color: var(--color-heading);
line-height: var(--leading-heading);
letter-spacing: -0.01em;
font-weight: 700;
overflow-wrap: break-word;
}
:is(.widget-prose, .widget-heading) .prose h3 { font-size: var(--text-h3); }
:is(.widget-prose, .widget-heading) .prose h4 { font-size: calc(var(--text-body) * 1.25); }
:is(.widget-prose, .widget-heading) .prose h5 { font-size: calc(var(--text-body) * 1.1); }
:is(.widget-prose, .widget-heading) .prose h6 { font-size: var(--text-body); }
:is(.widget-prose, .widget-heading) .prose > :first-child { margin-top: 0; }
:is(.widget-prose, .widget-heading) .prose blockquote {
margin: 0 0 var(--space-4);
padding: 0 0 0 var(--space-4);
border-inline-start: 4px solid var(--color-border-strong);
color: var(--color-text-muted);
}
:is(.widget-prose, .widget-heading) .prose blockquote > :last-child { margin-bottom: 0; }
/* Der Grundstil setzt Listen und Links zurück; im Fließtext sollen sie als solche erkennbar sein. */
:is(.widget-prose, .widget-heading) .prose ul { list-style: disc; }
:is(.widget-prose, .widget-heading) .prose ol { list-style: decimal; }
:is(.widget-prose, .widget-heading) .prose li { margin-block-end: var(--space-1); }
:is(.widget-prose, .widget-heading) .prose li > p { margin: 0; }
:is(.widget-prose, .widget-heading) .prose li::marker { color: var(--color-text-muted); }
:is(.widget-prose, .widget-heading) .prose a {
color: var(--color-link);
text-decoration: underline;
text-underline-offset: 0.2em;
overflow-wrap: anywhere;
}
:is(.widget-prose, .widget-heading) .prose a:hover { color: var(--color-link-hover, var(--color-link)); }
/*
* Auszeichnungen aus dem Editor (FormattedText::SITE_SIZES, SITE_COLORS): feste Stufen statt freier Werte. Die Größe ist
* relativ zur Umgebung, in einer Überschrift also zu deren Schrift. Die Farben sind auf hellen Flächen die Markenfarben;
* auf dunklen (`scope-dark`) und grünen (`scope-accent`) Flächen werden sie aufgehellt, damit die Schrift lesbar bleibt.
*/
:is(.widget-prose, .widget-heading) .prose {
--tc-marine: var(--lf-navy);
--tc-gruen: var(--lf-green-deep);
--tc-rot: #a8212b;
--tc-grau: var(--lf-ink-muted);
}
.scope-dark :is(.widget-prose, .widget-heading) .prose {
--tc-marine: var(--lf-white);
--tc-gruen: #b7dc84;
--tc-rot: #ffb4b0;
--tc-grau: #d3dde8;
}
.scope-accent :is(.widget-prose, .widget-heading) .prose {
--tc-marine: var(--lf-white);
--tc-gruen: var(--lf-white);
--tc-rot: #ffe1df;
--tc-grau: #eef4e8;
}
:is(.widget-prose, .widget-heading) .prose span[data-size='small'] { font-size: 0.875em; }
:is(.widget-prose, .widget-heading) .prose span[data-size='large'] { font-size: 1.25em; }
:is(.widget-prose, .widget-heading) .prose span[data-size='xlarge'] { font-size: 1.6em; line-height: 1.2; }
:is(.widget-prose, .widget-heading) .prose span.color[data-color='marine'] { color: var(--tc-marine); }
:is(.widget-prose, .widget-heading) .prose span.color[data-color='gruen'] { color: var(--tc-gruen); }
:is(.widget-prose, .widget-heading) .prose span.color[data-color='rot'] { color: var(--tc-rot); }
:is(.widget-prose, .widget-heading) .prose span.color[data-color='grau'] { color: var(--tc-grau); }
:is(.widget-prose, .widget-heading) .prose .ta-center { text-align: center; }
:is(.widget-prose, .widget-heading) .prose .ta-end { text-align: end; }
/* Tabelle: Der Rahmen scrollt bei wenig Platz waagerecht und ist mit der Tastatur erreichbar. */
.prose-table {
max-inline-size: 100%;
margin: 0 0 var(--space-4);
overflow-x: auto;
}
.prose-table:focus-visible {
outline: 3px solid var(--color-focus);
outline-offset: 3px;
}
.prose-table table {
inline-size: 100%;
min-inline-size: 24rem;
border-collapse: collapse;
}
.prose-table th,
.prose-table td {
padding: 0.5rem 0.75rem;
border: 1px solid var(--color-border);
text-align: start;
vertical-align: top;
}
.prose-table th {
background: var(--color-surface-subtle);
color: var(--color-heading);
font-weight: 700;
}
:is(.widget-prose, .widget-heading) .prose .prose-table p { margin: 0; }
:is(.widget-prose, .widget-heading) .prose .prose-table p + p,
:is(.widget-prose, .widget-heading) .prose .prose-table :is(ul, ol) { margin-top: 0.4em; }
:is(.widget-prose, .widget-heading) .prose .prose-table :is(ul, ol) { margin-bottom: 0; }
/* ------------------------------------------------------------------------------------------------
* 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(--pad-card);
}
.card-title {
font-size: var(--text-h3);
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.375rem, 3cqi, var(--text-h2));
}
.cards-featured .card-lead .card-body {
padding: clamp(var(--pad-card), 3.4cqi, var(--pad-surface));
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: var(--media-h);
}
}
/* 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: calc(var(--ds-space) * 11 / 16 * 1rem);
padding: var(--space-3) var(--pad-card);
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: var(--text-h3);
color: var(--lf-white);
}
.catalog-card-rays {
position: absolute;
top: var(--space-3);
right: var(--pad-card);
width: 2.75rem;
}
.catalog-card-body {
display: grid;
gap: var(--space-2);
align-content: start;
padding: var(--pad-card);
}
.catalog-card-body h3 {
font-size: var(--text-h3);
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: calc(var(--ds-space) * 16 / 16 * 1rem);
}
.catalog-cards-standard[data-count='1'] .catalog-card-body {
align-content: center;
padding: calc(var(--pad-card) * 1.5);
}
}
.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(var(--pad-card), 3.4cqi, var(--pad-surface));
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.375rem, 3.6cqi, var(--text-h2));
}
.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: var(--text-h3);
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);
}