/* * Boilerplate CSS – dersven.de * Version 2.0 · 2026 * * Raster und Klassennamen nach Skeleton 2.0.4 von Dave Gamache (MIT), www.getskeleton.com * * 1. Variablen * 2. Grundlagen * 3. Raster * 4. Typografie * 5. Links * 6. Buttons und Pills * 7. Formulare * 8. Listen * 9. Code * 10. Tabellen und Akkordeon * 11. Bilder und Abschnitte * 12. Seitenkopf, Seitenfuß, Hell/Dunkel, Nach oben, Glas-Panel, Toast * 13. Symbole und Icons * 14. Hilfsklassen */ /* 1. Variablen ========================================================================== */ /* * Stufe Größe Zeile davor danach * h1 34px 39px – 13px * h2 28px 32,5px 32,5px 13px * h3 22px 26px 39px 13px * h4 20px 26px 39px 13px * Fließtext 16px 26px – – * figcaption 13px 20px 26px 32px * * Hell und dunkel folgen dem System; überschreibt. */ :root { color-scheme: light dark; --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --schrift-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; --zeile: calc(26rem / 16); --halbe-zeile: calc(13rem / 16); --rand: 100px; --spalten-abstand: 30px; --max-breite: 1440px; --clr-text: light-dark(#1b1b1b, #fafaf7); --clr-text-muted: light-dark(#6e6e73, #9a9a96); --clr-background: light-dark(#fafaf7, #1b1b1b); --clr-surface: light-dark(#ffffff, #262624); --clr-gray-border: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1)); --clr-gray-bg: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.06)); --clr-stripe: light-dark(rgba(0, 0, 0, 0.025), rgba(255, 255, 255, 0.04)); --clr-primary: light-dark(rgb(0, 145, 0), rgb(72, 196, 88)); --clr-primary-accent: light-dark(rgb(0, 100, 0), rgb(120, 214, 132)); --clr-primary-light: light-dark(rgba(0, 145, 0, 0.14), rgba(72, 196, 88, 0.16)); --clr-on-primary: light-dark(#ffffff, #1b1b1b); --clr-error: #ff263d; --clr-error-light: rgba(255, 38, 61, 0.14); --clr-switch-off: light-dark(rgba(0, 0, 0, 0.16), rgba(255, 255, 255, 0.22)); --radius: 2px; --radius-pill: 999px; --feld-hoehe: 44px; } :root[data-theme="light"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; } @media (max-width: 734px) { :root { --rand: 30px; --spalten-abstand: 20px; } } /* 2. Grundlagen ========================================================================== */ *, *::before, *::after { box-sizing: border-box; } html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } body { margin: 0; font-family: var(--schrift); font-size: 1rem; line-height: var(--zeile); font-weight: 300; color: var(--clr-text); background: var(--clr-background); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-wrap: break-word; } hr { height: 0; margin: var(--zeile) 0; border: 0; border-top: 1px solid var(--clr-gray-border); } ::selection { background: var(--clr-primary-light); } /* 3. Raster ========================================================================== */ /* *
*
*
…
*
…
*
*
* Eigene Grids immer mit minmax(0, …) und min-width: 0 an den Kindern, * sonst drückt breiter Inhalt die Seite mobil über den Bildschirm. */ .container { width: 100%; max-width: calc(var(--max-breite) + 2 * var(--rand)); margin: 0 auto; padding: 0 var(--rand); } .row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--spalten-abstand); } .row > .column, .row > .columns { grid-column: 1 / -1; min-width: 0; } @media (min-width: 735px) { .one.column, .one.columns { grid-column: span 1; } .two.columns { grid-column: span 2; } .three.columns { grid-column: span 3; } .four.columns { grid-column: span 4; } .five.columns { grid-column: span 5; } .six.columns { grid-column: span 6; } .seven.columns { grid-column: span 7; } .eight.columns { grid-column: span 8; } .nine.columns { grid-column: span 9; } .ten.columns { grid-column: span 10; } .eleven.columns { grid-column: span 11; } .twelve.columns { grid-column: span 12; } .one-third.column { grid-column: span 4; } .two-thirds.column { grid-column: span 8; } .one-half.column { grid-column: span 6; } } /* 4. Typografie ========================================================================== */ h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; } h1 { font-size: calc(34rem / 16); line-height: calc(39rem / 16); margin-bottom: var(--halbe-zeile); font-weight: 800; letter-spacing: -0.02em; } h2 { font-size: calc(28rem / 16); line-height: calc(32.5rem / 16); margin-top: calc(32.5rem / 16); margin-bottom: var(--halbe-zeile); } h3 { font-size: calc(22rem / 16); line-height: var(--zeile); margin-top: calc(39rem / 16); margin-bottom: var(--halbe-zeile); } h4, h5, h6 { font-size: calc(20rem / 16); line-height: var(--zeile); margin-top: calc(39rem / 16); margin-bottom: var(--halbe-zeile); font-weight: 600; letter-spacing: 0; } :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; } p { margin: 0 0 var(--zeile); text-wrap: pretty; } p, ul, ol, dl, blockquote { max-width: 36em; } .lead { font-size: calc(20rem / 16); line-height: var(--zeile); color: var(--clr-text-muted); } small, figcaption, .klein { font-size: calc(13rem / 16); line-height: calc(20rem / 16); } .versal { font-size: calc(12rem / 16); line-height: calc(20rem / 16); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; } figcaption { display: block; margin-top: calc(6rem / 16); color: var(--clr-text-muted); } strong, b { font-weight: 600; } :lang(de) q { quotes: "\201E" "\201C" "\201A" "\2018"; } blockquote { position: relative; margin: 0 0 var(--zeile); padding-left: calc(44rem / 16); } blockquote::before { content: "\201C"; position: absolute; left: 0; top: -0.08em; font-size: calc(68rem / 16); font-weight: 700; line-height: 1; color: var(--clr-primary); } blockquote p { font-size: calc(22rem / 16); line-height: calc(32.5rem / 16); font-style: italic; } blockquote p:last-of-type { margin-bottom: 0; } blockquote cite { display: block; margin-top: calc(4rem / 16); font-size: 1rem; line-height: var(--zeile); font-style: normal; font-variant-caps: all-small-caps; letter-spacing: 0.06em; color: var(--clr-text-muted); } /* 5. Links ========================================================================== */ a { color: var(--clr-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-skip-ink: auto; transition: color 0.15s ease; } a:hover { color: var(--clr-primary); } :focus-visible { outline: 2px solid var(--clr-primary); outline-offset: 2px; } /* 6. Buttons und Pills ========================================================================== .button grüner Rahmen .button-primary grün gefüllt .button-neutral Rahmen in Textfarbe */ .button, button, input[type="submit"], input[type="reset"], input[type="button"] { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: var(--feld-hoehe); margin: 0 calc(6rem / 16) var(--halbe-zeile) 0; padding: 0 calc(20rem / 16); font: inherit; font-weight: 500; line-height: 1.2; color: var(--clr-primary); text-align: center; text-decoration: none; white-space: nowrap; background: transparent; border: 1px solid var(--clr-primary); border-radius: var(--radius); cursor: pointer; -webkit-appearance: none; appearance: none; transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, gap 0.2s ease; } .button:hover, button:hover, input[type="submit"]:hover, input[type="reset"]:hover, input[type="button"]:hover { color: var(--clr-on-primary); text-decoration: none; background: var(--clr-primary); } .button-primary, .button-primary:is(button, input) { color: var(--clr-on-primary); background: var(--clr-primary); border-color: var(--clr-primary); } .button-primary:hover, .button-primary:is(button, input):hover { color: var(--clr-on-primary); background: var(--clr-primary-accent); border-color: var(--clr-primary-accent); } .button-neutral, .button-neutral:is(button, input) { color: var(--clr-text); background: transparent; border-color: var(--clr-text); } .button-neutral:hover, .button-neutral:is(button, input):hover { color: var(--clr-background); background: var(--clr-text); border-color: var(--clr-text); } .button-pfeil::before { content: ""; flex: none; width: 8px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 14'%3E%3Cpath d='m1 1 6 6-6 6' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 14'%3E%3Cpath d='m1 1 6 6-6 6' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; transition: transform 0.2s ease; } .button-pfeil { justify-content: flex-start; padding-right: calc(20rem / 16 + 0.3em); transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, gap 0.2s ease, padding 0.2s ease; } .button-pfeil:hover { gap: 0.8em; padding-right: calc(20rem / 16); } .button-pfeil:hover::before { transform: translateX(0.15em); } .button-klein { min-height: 32px; padding: 0 calc(12rem / 16); font-size: calc(13rem / 16); } .button-gross { min-height: 52px; padding: 0 calc(28rem / 16); font-size: calc(20rem / 16); } /* */ .pill, .pill:is(button, a) { display: inline-flex; align-items: center; min-height: 32px; margin: 0; padding: 0 calc(12rem / 16); font: inherit; font-size: calc(14rem / 16); font-weight: 500; color: var(--clr-text); text-decoration: none; white-space: nowrap; background: none; border: 1px solid currentColor; border-radius: var(--radius-pill); cursor: pointer; } .pill:hover { color: var(--clr-primary); background: none; } .pill:is([aria-pressed="true"], [aria-selected="true"], [aria-current]) { color: var(--clr-background); background: var(--clr-text); border-color: var(--clr-text); } @media (prefers-reduced-motion: reduce) { .button-pfeil, .button-pfeil::before { transition: none; } } /* 7. Formulare ========================================================================== */ input[type="email"], input[type="number"], input[type="search"], input[type="text"], input[type="tel"], input[type="url"], input[type="password"], input[type="date"], textarea, select { display: block; width: 100%; min-height: var(--feld-hoehe); margin: 0 0 var(--zeile); padding: calc(8rem / 16) calc(12rem / 16); font: inherit; color: var(--clr-text); background: transparent; border: 1px solid var(--clr-text-muted); border-radius: var(--radius); -webkit-appearance: none; appearance: none; } @media (min-width: 735px) { :where(input[type="email"], input[type="number"], input[type="search"], input[type="text"], input[type="tel"], input[type="url"], input[type="password"], input[type="date"], textarea, select) { max-width: min(calc(100% - 100px), 32em); } } /* */ :is(input, textarea, select).feld-linie { padding-left: 0; padding-right: 0; border-width: 0 0 1px; border-color: currentColor; border-radius: 0; } :is(input, textarea, select).feld-linie:focus { outline: none; border-bottom-color: var(--clr-primary); box-shadow: 0 1px 0 var(--clr-primary); } textarea { min-height: calc(6 * var(--zeile)); resize: vertical; } select { padding-right: calc(36rem / 16); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right calc(14rem / 16) center; } input:focus, textarea:focus, select:focus { border-color: var(--clr-text); outline: 1px solid var(--clr-text); outline-offset: 0; } /* * *

Bitte eine gültige E-Mail-Adresse eingeben.

*/ input:user-invalid, textarea:user-invalid, select:user-invalid { margin-bottom: calc(6rem / 16); border-color: var(--clr-error); } input:user-invalid:focus, textarea:user-invalid:focus, select:user-invalid:focus { outline-color: var(--clr-error); } .feld-fehler { display: none; margin: 0 0 var(--zeile); font-size: calc(13rem / 16); line-height: calc(20rem / 16); font-weight: 500; color: var(--clr-error); } :user-invalid + .feld-fehler { display: block; } /* *

…

* *

…

*/ .meldung { display: flex; align-items: baseline; gap: 0.6em; margin: 0 0 var(--halbe-zeile); padding: calc(10rem / 16) calc(14rem / 16); border-radius: var(--radius); } .meldung-erfolg { background: var(--clr-primary-light); } .meldung-fehler { background: var(--clr-error-light); } .meldung-hinweis { background: var(--clr-gray-bg); } .meldung::before { content: ""; flex: none; width: 1rem; font-weight: 700; text-align: center; } .meldung-erfolg::before { content: "\2713"; color: var(--clr-primary); } .meldung-fehler::before { content: "\00D7"; font-size: 1.3em; line-height: 0; color: var(--clr-error); } .meldung-hinweis { color: var(--clr-text-muted); } ::placeholder { color: var(--clr-text-muted); opacity: 1; } label, legend { display: block; margin-bottom: calc(6rem / 16); font-weight: 600; } fieldset { margin: 0 0 var(--zeile); padding: 0; border: 0; } input[type="radio"] { width: 1.1em; height: 1.1em; margin: 0 0.5em 0 0; vertical-align: -0.15em; accent-color: var(--clr-primary); } /* * Segment: Einzelauswahl, grün; .segment-neutral in Textfarbe *
* oder
…
*/ .segment { --segment: var(--clr-primary); --segment-auf: var(--clr-on-primary); display: inline-flex; max-width: 100%; color: var(--segment); border: 1px solid var(--segment); border-radius: var(--radius); overflow: hidden; } .segment-neutral { --segment: var(--clr-text); --segment-auf: var(--clr-background); } .segment > :is(label, button) { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; min-height: 32px; margin: 0; padding: 0 0.85rem; font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.2; color: inherit; white-space: nowrap; background: none; border: 0; border-radius: 0; cursor: pointer; transition: color 0.15s ease, background-color 0.15s ease; } .segment > :is(label, button) + :is(label, button) { border-left: 1px solid var(--segment); } .segment input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; } .segment > :hover { background: var(--clr-gray-bg); } .segment > :is(label:has(input:checked), [aria-checked="true"], [aria-pressed="true"]) { color: var(--segment-auf); background: var(--segment); } .segment > :is(label:has(input:focus-visible), button:focus-visible) { outline: 2px solid var(--clr-primary); outline-offset: -4px; } /* Regler: */ .regler { width: 7.5rem; height: 1rem; margin: 0; color: inherit; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; } .regler::-webkit-slider-runnable-track { height: 1px; background: currentColor; } .regler::-moz-range-track { height: 1px; background: currentColor; } .regler::-moz-range-progress { height: 1px; background: currentColor; } .regler::-webkit-slider-thumb { width: 0.8rem; height: 0.8rem; margin-top: calc(-0.4rem + 0.5px); border: 0; border-radius: 50%; background: var(--clr-text); -webkit-appearance: none; appearance: none; } .regler::-moz-range-thumb { width: 0.8rem; height: 0.8rem; border: 0; border-radius: 50%; background: var(--clr-text); } .regler:hover::-webkit-slider-thumb { background: var(--clr-primary); } .regler:hover::-moz-range-thumb { background: var(--clr-primary); } .regler:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: 4px; } /* Checkbox als Schalter */ input[type="checkbox"] { --knopf: calc(31rem / 16); flex: none; width: calc(51rem / 16); height: var(--knopf); margin: 0 0.6em 0 0; vertical-align: middle; cursor: pointer; border-radius: var(--knopf); background: radial-gradient(circle, #fff 0 calc(var(--knopf) / 2 - 2px), transparent calc(var(--knopf) / 2 - 1.5px)) left center / var(--knopf) var(--knopf) no-repeat, var(--clr-switch-off); -webkit-appearance: none; appearance: none; transition: background-position 0.2s ease, background-color 0.2s ease; } input[type="checkbox"]:checked { background-color: var(--clr-primary); background-position: right center, 0 0; } input[type="checkbox"]:focus { outline: none; } input[type="checkbox"]:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: 2px; } input[type="checkbox"]:disabled { opacity: 0.4; cursor: default; } @media (prefers-reduced-motion: reduce) { input[type="checkbox"] { transition: none; } } label > .label-body { display: inline-block; font-weight: 400; } /* 8. Listen ========================================================================== */ ul, ol { --einzug: 1.25em; margin: 0 0 var(--zeile); padding-left: var(--einzug); list-style: none; } ul ul, ul ol, ol ol, ol ul { margin: 0; } ul > li, ol > li { position: relative; } ul > li::before { content: ""; position: absolute; left: calc(-1 * var(--einzug)); top: calc(var(--zeile) / 2 - 0.2em); width: 0.36em; height: 0.36em; background: currentColor; } ol { counter-reset: punkt; } ol > li { counter-increment: punkt; } ol > li::before { content: counter(punkt) "."; position: absolute; left: calc(-1 * var(--einzug)); font-variant-numeric: tabular-nums; } dl { margin: 0 0 var(--zeile); } dt { font-weight: 600; } dd { margin: 0 0 var(--halbe-zeile); } /* 9. Code ========================================================================== */ code, kbd, pre { font-family: var(--schrift-mono); font-size: 0.88em; } code { padding: 0; background: none; } pre { margin: 0 0 var(--zeile); padding: 0 0 0 calc(16rem / 16); line-height: 1.55; overflow-x: auto; background: none; border-left: 1px solid var(--clr-text); } pre > code { padding: 0; font-size: inherit; background: none; white-space: pre; } /* 10. Tabellen und Akkordeon ========================================================================== */ table { width: 100%; margin: 0 0 var(--zeile); border-collapse: collapse; font-variant-numeric: tabular-nums; } th, td { padding: calc(8rem / 16) calc(12rem / 16); text-align: left; border-bottom: 1px solid var(--clr-gray-border); } th:first-child, td:first-child { padding-left: calc(8rem / 16); } th:last-child, td:last-child { padding-right: calc(8rem / 16); } tbody tr:nth-child(even) { background: var(--clr-stripe); } th { font-weight: 600; } /* Zahlenspalte: */ :is(th, td).zahl { text-align: right; } /* Linien trennen Zeilen, unter der letzten steht keine */ tbody tr:last-child > :is(td, th) { border-bottom: 0; } /* Breite Tabelle scrollt in sich, erste Spalte bleibt stehen:
…
*/ .tabelle-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; margin: 0 0 var(--zeile); } .tabelle-scroll table { margin: 0; } .tabelle-scroll :is(th, td) { white-space: nowrap; } .tabelle-scroll :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--abschnitt, var(--clr-background)); } .tabelle-scroll tbody tr:nth-child(even) > :first-child { background: color-mix(in srgb, var(--clr-text) 2.5%, var(--abschnitt, var(--clr-background))); } /*
Frage

Antwort

*/ details { max-width: 36em; border-bottom: 1px solid var(--clr-gray-border); } details:not(details + details) { border-top: 1px solid var(--clr-gray-border); } summary { display: flex; align-items: center; justify-content: space-between; gap: var(--spalten-abstand); min-height: 52px; cursor: pointer; list-style: none; } summary::-webkit-details-marker { display: none; } summary::after { content: ""; flex: none; width: 14px; height: 8px; background: var(--clr-text-muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; transition: transform 0.25s ease; } details[open] > summary::after { transform: rotate(180deg); } details > :not(summary) { margin-top: 0; } details[open] > :not(summary) { animation: aufklappen 0.25s ease; } details > :last-child:not(summary) { margin-bottom: var(--halbe-zeile); } @keyframes aufklappen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } } @media (prefers-reduced-motion: reduce) { summary::after { transition: none; } details[open] > :not(summary) { animation: none; } } /* 11. Bilder und Abschnitte ========================================================================== */ img, svg, video { max-width: 100%; height: auto; } figure { margin: 0 0 var(--zeile); } figure img { display: block; width: 100%; border-radius: var(--radius); } section { padding: calc(4 * var(--zeile)) 0; } @media (max-width: 734px) { section { padding: calc(2.5 * var(--zeile)) 0; } } /* 12. Seitenkopf, Seitenfuß, Hell/Dunkel, Nach oben, Toast ========================================================================== */ .seitenkopf { padding: var(--zeile) 0; } .seitenkopf .container { display: flex; align-items: center; justify-content: space-between; gap: var(--spalten-abstand); } .seitenkopf-name { font-weight: 600; color: var(--clr-text); text-decoration: none; } .seitenkopf-name:hover { color: var(--clr-text); text-decoration: none; } .seitenfuss { padding: var(--zeile) 0; font-size: calc(13rem / 16); line-height: calc(20rem / 16); color: var(--clr-text-muted); border-top: 1px solid var(--clr-gray-border); } .icon-knopf, .theme-schalter { display: inline-flex; width: var(--feld-hoehe); min-width: var(--feld-hoehe); margin: 0; padding: 0; color: var(--clr-text); background: none; border: 0; } .icon-knopf:hover, .theme-schalter:hover { color: var(--clr-text); background: none; opacity: 0.6; } .theme-schalter svg { width: 22px; height: 22px; } .icon-knopf { align-items: center; justify-content: center; height: var(--feld-hoehe); cursor: pointer; } .icon-knopf .icon { width: 20px; height: 20px; } /* Variante Kontrast: