diff --git a/CHANGELOG.md b/CHANGELOG.md
index 48bc760..7991809 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog
+## 0.2.0
+
+- Added semantic `--frost-color-selection` and `--frost-color-overlay` tokens for project-defined themes.
+- Added compact and icon button variants: `frost-button--sm` and `frost-button--icon`.
+- Added CSS-only modal primitives: `frost-backdrop`, `frost-modal`, and modal content/header/body/footer helpers.
+
## 0.1.0
- Added the semantic Frost token system.
diff --git a/README.md b/README.md
index 7bd2bbd..24da453 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,13 @@ npm install @fretuks/frost
```
+Compact and icon controls are available when a project needs smaller repeated actions:
+
+```html
+
+
+```
+
## Forms
```html
@@ -93,6 +100,19 @@ 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.
+
+```html
+
+
+```
+
## Customization
Override semantic tokens in the project layer:
diff --git a/base.css b/base.css
index b367528..ce5afe0 100644
--- a/base.css
+++ b/base.css
@@ -38,6 +38,6 @@
:where(code, kbd, pre) { font-family: var(--frost-font-mono); }
:where(table) { border-collapse: collapse; border-spacing: 0; }
:where(th, td) { text-align: start; }
- :where(::selection) { background: var(--frost-color-accent); color: var(--frost-color-on-accent); }
+ :where(::selection) { background: var(--frost-color-selection); color: var(--frost-color-on-accent); }
}
diff --git a/components.css b/components.css
index 1590b4c..2ac179d 100644
--- a/components.css
+++ b/components.css
@@ -37,6 +37,40 @@
.frost-notice--warning { border-color: var(--frost-color-warning); }
.frost-notice--danger { border-color: var(--frost-color-danger); }
+ .frost-backdrop {
+ position: fixed;
+ inset: 0;
+ background: var(--frost-color-overlay);
+ z-index: var(--frost-z-overlay);
+ }
+
+ .frost-modal {
+ position: fixed;
+ inset: 0;
+ display: grid;
+ place-items: center;
+ padding: var(--frost-space-4);
+ z-index: var(--frost-z-modal);
+ }
+
+ .frost-modal__content {
+ width: min(100%, 32rem);
+ max-height: min(90vh, 42rem);
+ overflow: auto;
+ padding: var(--frost-space-6);
+ border: 1px solid var(--frost-color-border-strong);
+ border-radius: var(--frost-radius-lg);
+ background: var(--frost-color-surface);
+ color: var(--frost-color-text);
+ box-shadow: var(--frost-shadow-lg);
+ }
+
+ .frost-modal__header,
+ .frost-modal__footer { display: flex; align-items: center; gap: var(--frost-space-3); }
+ .frost-modal__header { justify-content: space-between; margin-block-end: var(--frost-space-4); }
+ .frost-modal__body { display: grid; gap: var(--frost-space-4); }
+ .frost-modal__footer { justify-content: flex-end; margin-block-start: var(--frost-space-4); }
+
@media (prefers-reduced-motion: reduce) {
.frost-card--interactive:hover,
.frost-card--interactive:focus-within { transform: none; }
diff --git a/controls.css b/controls.css
index aac527d..549c7ed 100644
--- a/controls.css
+++ b/controls.css
@@ -26,6 +26,8 @@
:where(.frost-button--danger:hover:not(:disabled):not([aria-disabled="true"])) { filter: brightness(0.92); }
:where(.frost-button:active:not(:disabled):not([aria-disabled="true"])) { transform: translateY(1px); }
:where(.frost-button:disabled, .frost-button[aria-disabled="true"]) { opacity: 0.55; cursor: not-allowed; }
+ :where(.frost-button--sm) { min-height: 2rem; padding: var(--frost-space-1) var(--frost-space-2); font-size: var(--frost-font-size-sm); }
+ :where(.frost-button--icon) { width: 2.5rem; min-width: 2.5rem; padding: var(--frost-space-2); }
:where(.frost-input, .frost-select, .frost-textarea) {
display: block;
diff --git a/package.json b/package.json
index 566de2b..07df67e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@fretuks/frost",
- "version": "0.1.0",
+ "version": "0.2.0",
"description": "A compact, semantic CSS foundation for websites and web applications.",
"style": "./frost.css",
"exports": {
diff --git a/tokens.css b/tokens.css
index 2d5999c..fdd8bec 100644
--- a/tokens.css
+++ b/tokens.css
@@ -12,6 +12,8 @@
--frost-color-accent: #2563eb;
--frost-color-accent-hover: #1d4ed8;
--frost-color-on-accent: #ffffff;
+ --frost-color-selection: var(--frost-color-accent);
+ --frost-color-overlay: rgb(0 0 0 / 0.6);
--frost-color-success: #147a4b;
--frost-color-warning: #9a5b00;
--frost-color-danger: #b42318;
@@ -59,6 +61,8 @@
--frost-focus-color: var(--frost-color-accent);
--frost-focus-width: 3px;
--frost-focus-offset: 3px;
+ --frost-z-overlay: 1000;
+ --frost-z-modal: 1001;
}
@media (prefers-color-scheme: dark) {
@@ -75,6 +79,8 @@
--frost-color-accent: #79a9ff;
--frost-color-accent-hover: #a0c2ff;
--frost-color-on-accent: #0d1a32;
+ --frost-color-selection: var(--frost-color-accent);
+ --frost-color-overlay: rgb(0 0 0 / 0.72);
--frost-color-success: #65d39b;
--frost-color-warning: #f3bd63;
--frost-color-danger: #ff9388;
@@ -98,6 +104,8 @@
--frost-color-accent: #79a9ff;
--frost-color-accent-hover: #a0c2ff;
--frost-color-on-accent: #0d1a32;
+ --frost-color-selection: var(--frost-color-accent);
+ --frost-color-overlay: rgb(0 0 0 / 0.72);
--frost-color-success: #65d39b;
--frost-color-warning: #f3bd63;
--frost-color-danger: #ff9388;