Stabilize Frost and prepare npm package
This commit is contained in:
@@ -16,6 +16,16 @@ For a CSS-aware build:
|
||||
@import "./frost/frost.css";
|
||||
```
|
||||
|
||||
For npm-based projects:
|
||||
|
||||
```bash
|
||||
npm install @fretux/frost
|
||||
```
|
||||
|
||||
```css
|
||||
@import "@fretux/frost";
|
||||
```
|
||||
|
||||
## Basic usage
|
||||
|
||||
```html
|
||||
@@ -71,6 +81,18 @@ or:
|
||||
|
||||
Frost does not require JavaScript; a theme switcher can be added later by Iceberg or ordinary vanilla JavaScript.
|
||||
|
||||
Projects with additional themes should override Frost's semantic roles rather than reaching into component selectors:
|
||||
|
||||
```css
|
||||
body.theme-blue {
|
||||
--frost-color-bg: #071a2b;
|
||||
--frost-color-surface: #0d2a40;
|
||||
--frost-color-text: #e8f5ff;
|
||||
--frost-color-accent: #55b9ff;
|
||||
--frost-color-accent-hover: #8bd1ff;
|
||||
}
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
Override semantic tokens in the project layer:
|
||||
@@ -85,6 +107,16 @@ 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.
|
||||
|
||||
## Package maintenance
|
||||
|
||||
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.
|
||||
|
||||
```bash
|
||||
npm run lint
|
||||
npm run size
|
||||
npm pack --dry-run
|
||||
```
|
||||
|
||||
## Philosophy
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user