diff --git a/CHANGELOG.md b/CHANGELOG.md
index aea879f..f5f2f07 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.5.0
+
+- Added a generated utility layer for layout, spacing, typography, colors, borders, shadows, responsive breakpoints, and interaction states.
+- Added standalone package exports for tokens, components, utilities, and base styles.
+- Added navbar, breadcrumbs, tabs, accordion, pagination, table, and spinner primitives.
+- Added semantic link, code, disabled, font-size, and breakpoint tokens.
+- Expanded the example page and validation checks for the public API.
+
## 0.4.0
- Added semantic success, danger, warning, backdrop, popover, and toast tokens.
diff --git a/README.md b/README.md
index 50730d0..1db9cf9 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,29 @@
-# Frost CSS Framework
+# Frost
-Frost is a small, semantic CSS foundation for personal websites and web applications. It provides tokens, accessible base styles, layout primitives, controls, and a few common components without trying to replace Bootstrap or Tailwind.
+Frost ist eine kleine CSS-Basis für persönliche Websites und Web-Apps. Sie bringt Tokens, zugängliche Grundstyles, Utility-Klassen, Layout-Helfer, Controls und fertige Komponenten mit. Du kannst Frost also entweder eher wie Tailwind mit einzelnen Utilities oder eher wie Bootstrap mit Komponenten verwenden.
-## Installation
+## Einbinden
-For a static site:
+Frost hat bewusst getrennte Schichten:
+
+- `@fretuks/frost/core`: Tokens, Reset und Accessibility-Grundlagen
+- `@fretuks/frost/utility-layer`: Core plus Layout- und Utility-first-Klassen
+- `@fretuks/frost/component-layer`: Core plus Controls und fertige Komponenten
+- `@fretuks/frost`: alle Schichten zusammen
+
+Für eine statische Website:
```html
```
-For a CSS-aware build:
+Mit einem CSS-Build-Tool:
```css
@import "./frost/frost.css";
```
-For npm-based projects:
+In einem npm-Projekt:
```bash
npm install @fretuks/frost
@@ -26,28 +33,87 @@ npm install @fretuks/frost
@import "@fretuks/frost";
```
-## Basic usage
+Für die Utility-Schicht:
+
+```css
+@import "@fretuks/frost/utility-layer";
+```
+
+Für die Komponenten-Schicht:
+
+```css
+@import "@fretuks/frost/component-layer";
+```
+
+## Grundlegende Nutzung
```html
-
+```
+
+Für einfache Zustände gibt es ebenfalls Varianten:
+
+```html
+
+ Zum Profil
+
+```
+
+Die Utility-Datei wird aus `scripts/generate-utilities.mjs` erzeugt. Wenn sich die gemeinsame Utility-API ändert:
+
+```bash
+npm run generate:utilities
+```
+
+Utilities verwenden immer den Präfix `frost-`. Responsive Varianten folgen dem Muster `frost-md:*` und `frost-lg:*`; Zustände verwenden `frost-hover:*`, `frost-focus:*` und `frost-active:*`. Die Utility-Schicht enthält keine fertigen Komponenten und kann unabhängig von der Komponenten-Schicht eingesetzt werden.
+
+Zusätzliche Utilities sind unter anderem `frost-relative`, `frost-absolute`, `frost-grid-cols-3`, `frost-col-span-2`, `frost-space-y-4`, `frost-opacity-50`, `frost-z-10` und `frost-truncate`.
+
## Layout
```html
- One
- Two
+ Eins
+ Zwei
```
-`frost-stack`, `frost-row`, and `frost-grid` expose local custom properties for gap customization:
+`frost-stack`, `frost-row` und `frost-grid` haben lokale Custom Properties für den Abstand:
```html
@@ -55,40 +121,40 @@ npm install @fretuks/frost
```
-Compact and icon controls are available when a project needs smaller repeated actions:
+Für kleinere, wiederkehrende Aktionen gibt es kompakte Buttons und Icon-Buttons:
```html
-
-
+
+
```
-## Forms
+## Formulare
```html
```
## Themes
-Without an explicit theme, Frost follows `prefers-color-scheme`. Explicit themes override that behavior:
+Ohne explizites Theme richtet sich Frost nach `prefers-color-scheme`. Ein explizites Theme überschreibt dieses Verhalten:
```html
```
-or:
+oder:
```html
```
-Frost does not require JavaScript; a theme switcher can be added later by Iceberg or ordinary vanilla JavaScript.
+Frost braucht kein JavaScript. Ein Theme-Schalter kann später mit Iceberg oder ganz normalem Vanilla-JavaScript ergänzt werden.
-Projects with additional themes should override Frost's semantic roles rather than reaching into component selectors:
+Wenn ein Projekt weitere Themes braucht, sollten die semantischen Rollen von Frost überschrieben werden – nicht die Component-Selektoren:
```css
body.theme-blue {
@@ -100,9 +166,9 @@ body.theme-blue {
}
```
-`--frost-color-selection` and `--frost-color-overlay` are available for theme-specific selection and overlay colors. Frost's modal primitives provide visual structure only; opening, closing, focus management, and ARIA behavior remain application responsibilities.
+Für Theme-spezifische Auswahl- und Overlay-Farben gibt es `--frost-color-selection` und `--frost-color-overlay`. Die Modal-Styles kümmern sich nur um die Darstellung. Öffnen, Schließen, Fokusmanagement und ARIA-Verhalten bleiben Aufgabe der Anwendung.
-Frost's tokens are semantic and intentionally overridable. Add an application theme by setting the roles on a wrapper or document root; component selectors do not need to be redefined:
+Die Tokens von Frost sind semantisch und können bewusst überschrieben werden. Ein Anwendungstheme lässt sich auf einem Wrapper oder dem Dokument-Root setzen; die Component-Selektoren müssen dafür nicht neu definiert werden:
```css
[data-theme="ocean"] {
@@ -119,54 +185,56 @@ Frost's tokens are semantic and intentionally overridable. Add an application th
-
Confirm
-
Continue?
+
Bestätigen
+
Fortfahren?
```
-## Menus, popovers, and feedback
+## Menüs, Popovers und Feedback
-Frost supplies visual primitives while application code owns state, positioning updates, and keyboard behavior. Use native buttons, `aria-expanded`, `aria-controls`, and `hidden` so the same markup works with vanilla JavaScript or a framework:
+Frost liefert die visuellen Bausteine. Die Anwendung kümmert sich um Zustand, Positionierung und Tastaturverhalten. Am besten native Buttons, `aria-expanded`, `aria-controls` und `hidden` verwenden – dann funktioniert dasselbe Markup mit Vanilla-JavaScript oder einem Framework:
```html
```
-Tooltips use `data-frost-tooltip` and should supplement, never replace, an accessible label:
+Tooltips verwenden `data-frost-tooltip` und sollten ein zugängliches Label ergänzen, niemals ersetzen:
```html
-
+
```
-Modal, drawer, dropdown, and popover behavior is deliberately separate from CSS. A behavior layer should toggle `hidden`, synchronize `aria-expanded`, move focus into dialogs, return focus to the trigger, and close on Escape where appropriate. For modal dialogs, use `role="dialog" aria-modal="true"` and a labelled heading.
+Das Verhalten von Modal, Drawer, Dropdown und Popover ist bewusst vom CSS getrennt. Eine Behavior-Schicht sollte `hidden` umschalten, `aria-expanded` synchron halten, den Fokus in Dialoge setzen, nach dem Schließen zum Trigger zurückbringen und – wo sinnvoll – mit Escape schließen. Für Modals `role="dialog" aria-modal="true"` und eine beschriftende Überschrift verwenden.
-## Responsive utilities
+Weitere CSS-only Bausteine sind `frost-navbar`, `frost-breadcrumbs`, `frost-tabs`, `frost-accordion`, `frost-pagination`, `frost-table` und `frost-spinner`. Sie liefern Markup-Struktur und Zustände; Interaktionen wie Tabs umschalten oder Accordion öffnen bleiben bei der Anwendung.
-`frost-cluster` is a wrapping flex row for actions, while `frost-hide-mobile`, `frost-show-mobile`, `frost-hide-desktop`, and `frost-responsive` cover common responsive composition needs. Layout components expose local properties such as `--frost-grid-min` and `--frost-cluster-gap` so applications can tune them without new framework classes.
+## Responsive Helfer
-## Customization
+`frost-cluster` ist eine umbrechende Flex-Reihe für Aktionen. `frost-hide-mobile`, `frost-show-mobile`, `frost-hide-desktop` und `frost-responsive` decken ein paar typische Responsive-Fälle ab. Layout-Komponenten haben lokale Properties wie `--frost-grid-min` und `--frost-cluster-gap`, sodass sie ohne neue Framework-Klassen angepasst werden können.
-Override semantic tokens in the project layer:
+## Anpassen
+
+Semantische Tokens können auf Projektebene überschrieben werden:
```css
:root {
@@ -176,11 +244,11 @@ Override semantic tokens in the project layer:
}
```
-The public API uses the `frost-` class prefix and `--frost-*` custom-property prefix to reduce collisions with project CSS and third-party libraries.
+Die öffentliche API verwendet den Präfix `frost-` für Klassen und `--frost-*` für Custom Properties. So gibt es weniger Konflikte mit dem eigenen CSS und Libraries von Drittanbietern.
-## Package maintenance
+## Paket pflegen
-The package intentionally ships only the CSS modules, documentation, license, and small dependency-free validation scripts. Example pages remain in the repository but are excluded from the npm tarball.
+Das Paket enthält absichtlich nur die CSS-Module, die Doku, die Lizenz und ein paar kleine, dependency-freie Validierungsskripte. Beispielseiten bleiben im Repository, landen aber nicht im npm-Tarball.
```bash
npm run lint
@@ -188,7 +256,14 @@ npm run size
npm pack --dry-run
```
-## Philosophy
+Neben dem vollständigen Paket können einzelne Schichten importiert werden:
-Frost is intentionally smaller than Bootstrap and Tailwind. It establishes predictable foundations while leaving branding, page composition, JavaScript behavior, and specialized components to the project using it.
+```css
+@import "@fretuks/frost/utilities";
+@import "@fretuks/frost/components";
+@import "@fretuks/frost/tokens";
+```
+## Warum das Ganze?
+
+Frost soll eine überschaubare, verlässliche Grundlage sein. Branding, konkrete Seitengestaltung, JavaScript-Verhalten und speziellere Komponenten bleiben dort, wo sie hingehören: im jeweiligen Projekt.
diff --git a/base.css b/base.css
index ce5afe0..0b839ee 100644
--- a/base.css
+++ b/base.css
@@ -25,7 +25,8 @@
:where(button:disabled, input:disabled, select:disabled, textarea:disabled) { cursor: not-allowed; }
:where(img, picture, video, canvas, svg) { display: block; max-width: 100%; }
:where(img, video) { height: auto; }
- :where(a) { color: var(--frost-color-accent); }
+ :where(a) { color: var(--frost-color-link); }
+ :where(a:hover) { color: var(--frost-color-link-hover); }
:where(button) { color: inherit; }
:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) { margin-block: 0; }
:where(h1, h2, h3, h4, h5, h6) {
@@ -36,6 +37,8 @@
:where(h1) { font-size: clamp(2rem, 5vw, 3.5rem); }
:where(h2) { font-size: var(--frost-font-size-xl); }
:where(code, kbd, pre) { font-family: var(--frost-font-mono); }
+ :where(code, kbd) { padding: 0.1em 0.3em; border-radius: var(--frost-radius-sm); background: var(--frost-color-code-bg); color: var(--frost-color-code-text); }
+ :where(pre) { overflow: auto; padding: var(--frost-space-4); border: 1px solid var(--frost-color-border); border-radius: var(--frost-radius-md); background: var(--frost-color-code-bg); color: var(--frost-color-code-text); }
:where(table) { border-collapse: collapse; border-spacing: 0; }
:where(th, td) { text-align: start; }
:where(::selection) { background: var(--frost-color-selection); color: var(--frost-color-on-accent); }
diff --git a/component-layer.css b/component-layer.css
new file mode 100644
index 0000000..51b3213
--- /dev/null
+++ b/component-layer.css
@@ -0,0 +1,6 @@
+@layer frost.tokens, frost.base, frost.accessibility, frost.layout, frost.controls, frost.components;
+
+@import url("./core.css");
+@import url("./layout.css") layer(frost.layout);
+@import url("./controls.css") layer(frost.controls);
+@import url("./components.css") layer(frost.components);
diff --git a/components.css b/components.css
index 8497f60..dd352a2 100644
--- a/components.css
+++ b/components.css
@@ -103,18 +103,47 @@
.frost-modal--drawer { place-items: stretch end; padding: 0; }
.frost-modal--drawer .frost-modal__content { width: min(100%, 28rem); max-height: none; height: 100%; border-radius: var(--frost-radius-lg) 0 0 var(--frost-radius-lg); }
+ .frost-navbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--frost-space-4); padding-block: var(--frost-space-4); }
+ .frost-navbar__brand { color: var(--frost-color-text); font-weight: 700; text-decoration: none; }
+ .frost-navbar__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--frost-space-2); }
+ .frost-navbar__link { padding: var(--frost-space-2) var(--frost-space-3); border-radius: var(--frost-radius-sm); color: var(--frost-color-text-muted); text-decoration: none; }
+ .frost-navbar__link:hover, .frost-navbar__link[aria-current="page"] { background: var(--frost-color-surface-soft); color: var(--frost-color-text); }
+
+ .frost-breadcrumbs { display: flex; flex-wrap: wrap; gap: var(--frost-space-2); color: var(--frost-color-text-muted); font-size: var(--frost-font-size-sm); }
+ .frost-breadcrumbs__item:not(:last-child)::after { margin-inline-start: var(--frost-space-2); color: var(--frost-color-border-strong); content: "/"; }
+ .frost-breadcrumbs__item[aria-current="page"] { color: var(--frost-color-text); }
+
+ .frost-tabs { display: flex; flex-wrap: wrap; gap: var(--frost-space-1); border-block-end: 1px solid var(--frost-color-border); }
+ .frost-tabs__tab { padding: var(--frost-space-2) var(--frost-space-3); border: 0; border-block-end: 2px solid transparent; background: transparent; color: var(--frost-color-text-muted); cursor: pointer; }
+ .frost-tabs__tab:hover, .frost-tabs__tab[aria-selected="true"] { border-block-end-color: var(--frost-color-accent); color: var(--frost-color-text); }
+ .frost-tabs__panel { padding-block: var(--frost-space-4); }
+
+ .frost-accordion { border-block-start: 1px solid var(--frost-color-border); }
+ .frost-accordion__item { border-block-end: 1px solid var(--frost-color-border); }
+ .frost-accordion__trigger { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: var(--frost-space-4); padding: var(--frost-space-4) 0; border: 0; background: transparent; color: var(--frost-color-text); text-align: start; font-weight: 650; }
+ .frost-accordion__panel { padding-block: 0 var(--frost-space-4); }
+ .frost-accordion__panel[hidden] { display: none; }
+
+ .frost-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: var(--frost-space-1); }
+ .frost-pagination__item { display: inline-flex; min-width: 2.5rem; min-height: 2.5rem; align-items: center; justify-content: center; padding: var(--frost-space-2); border: 1px solid var(--frost-color-border); border-radius: var(--frost-radius-sm); background: var(--frost-color-surface); color: var(--frost-color-text); text-decoration: none; }
+ .frost-pagination__item:hover, .frost-pagination__item[aria-current="page"] { border-color: var(--frost-color-accent); background: var(--frost-color-accent); color: var(--frost-color-on-accent); }
+
+ .frost-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
+ .frost-table { width: 100%; min-width: 32rem; border: 1px solid var(--frost-color-border); }
+ .frost-table th, .frost-table td { padding: var(--frost-space-3) var(--frost-space-4); border-block-end: 1px solid var(--frost-color-border); }
+ .frost-table th { background: var(--frost-color-surface-soft); font-weight: 700; }
+ .frost-table tbody tr:hover { background: var(--frost-color-surface-soft); }
+
+ .frost-spinner { display: inline-block; width: 1.25rem; height: 1.25rem; border: 0.18rem solid var(--frost-color-border); border-block-start-color: var(--frost-color-accent); border-radius: 50%; animation: frost-spin 700ms linear infinite; }
+ .frost-spinner--sm { width: 1rem; height: 1rem; }
+ .frost-spinner--lg { width: 2rem; height: 2rem; }
+ @keyframes frost-spin { to { transform: rotate(360deg); } }
+
[data-theme="dark"] .frost-tooltip::after { background: var(--frost-color-surface-soft); color: var(--frost-color-text); }
@media (prefers-reduced-motion: reduce) {
.frost-card--interactive:hover,
.frost-card--interactive:focus-within { transform: none; }
+ .frost-spinner { animation-duration: 0.01ms; animation-iteration-count: 1; }
}
}
-
-@layer frost.utilities {
- .frost-text-muted { color: var(--frost-color-text-muted); }
- .frost-text-center { text-align: center; }
- .frost-width-full { width: 100%; }
- .frost-overflow-auto { overflow: auto; }
-}
-
diff --git a/core.css b/core.css
new file mode 100644
index 0000000..fff58b8
--- /dev/null
+++ b/core.css
@@ -0,0 +1,5 @@
+@layer frost.tokens, frost.base, frost.accessibility;
+
+@import url("./tokens.css") layer(frost.tokens);
+@import url("./base.css") layer(frost.base);
+@import url("./accessibility.css") layer(frost.accessibility);
diff --git a/examples/index.html b/examples/index.html
index 675e2ea..3e645a4 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -1,9 +1,9 @@
-
+
- Frost v0.4 example
+ Frost – Beispiel
- Skip to content
+ Zum Inhalt springen
-
Frost CSS framework
-
Small foundations for cold starts.
+
Frost CSS Framework
+
Kleine Bausteine für eigene Projekte.
-
+
-
- Frost is CSS-only. This page uses a tiny script only to demonstrate explicit theme switching.
+
+ Frost ist CSS-only. Das kleine Script auf dieser Seite zeigt nur den Theme-Wechsel und das Öffnen des Menüs.
-
Tokens and surfaces
-
-
Accent
-
Flat card
-
Elevated card
+
Tokens und Oberflächen
+
+
Akzent
+
Flache Karte
+
Erhöhte Karte
-
Feedback and menus
+
Feedback und Menüs
- Heads up
- This is a dismissible-style alert primitive; your behavior layer controls dismissal.
+ Hinweis
+ Das CSS stellt nur die Darstellung bereit; das Verhalten kommt aus deiner Anwendung.