zeus-css 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -0
- package/README.md +2 -1
- package/bin/init.js +15 -0
- package/dist/zeus.css +43 -62
- package/dist/zeus.min.css +1 -1
- package/package.json +15 -10
- package/scss/CHANGELOG.md +104 -291
- package/scss/foundation/core/design/colors/semantic-colors.scss +26 -33
- package/scss/foundation/core/design/typography/typography.scss +0 -36
- package/scss/foundation/core/engine/typography-calc.scss +6 -1
- package/scss/foundation/views/render/html-body.scss +1 -2
- package/scss/foundation/views/render/reset.scss +14 -4
- package/scss/foundation/views/render/root-generator.scss +9 -7
- package/scss/zeus.config.scss +1 -1
- package/scss/zeus.customize.scss +1 -2
- package/scss/zeus.token.sets.example.scss +0 -4
- package/scss/zeus.tokens.json +667 -687
- package/bin/postinstall.js +0 -13
- package/scss/.stylelintrc.json +0 -41
- package/scss/API.md +0 -175
- package/scss/LICENSE +0 -21
- package/scss/README.md +0 -193
- package/scss/cheatsheet.md +0 -249
- package/scss/dist/zeus.css +0 -8465
- package/scss/dist/zeus.css.map +0 -1
- package/scss/dist/zeus.min.css +0 -1
- package/scss/dist/zeus.min.css.map +0 -1
- package/scss/llms.txt +0 -247
- package/scss/package.json +0 -89
- package/scss/scripts/gen-cheatsheet.mjs +0 -178
- package/scss/scripts/gen-tokens.mjs +0 -90
- package/scss/scripts/test-compile.mjs +0 -472
package/bin/postinstall.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
try {
|
|
3
|
-
if (process.env.CI) {
|
|
4
|
-
process.exit(0);
|
|
5
|
-
}
|
|
6
|
-
console.log('');
|
|
7
|
-
console.log('⚡ Zeus CSS installed.');
|
|
8
|
-
console.log(' Run `npx zeus-css init` to get local zeus.config.scss / zeus.customize.scss files you can edit.');
|
|
9
|
-
console.log(' (Skip this if you only want the default theme via zeus-css/dist/zeus.css.)');
|
|
10
|
-
console.log('');
|
|
11
|
-
} catch (e) {
|
|
12
|
-
// Never fail an install just because the reminder couldn't print.
|
|
13
|
-
}
|
package/scss/.stylelintrc.json
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "stylelint-config-standard-scss",
|
|
3
|
-
"ignoreFiles": ["zeus.token.sets.example.scss"],
|
|
4
|
-
"rules": {
|
|
5
|
-
"no-empty-source": null,
|
|
6
|
-
"scss/at-rule-no-unknown": true,
|
|
7
|
-
|
|
8
|
-
"selector-class-pattern": null,
|
|
9
|
-
"custom-property-pattern": null,
|
|
10
|
-
"scss/dollar-variable-pattern": null,
|
|
11
|
-
"scss/at-function-pattern": null,
|
|
12
|
-
|
|
13
|
-
"alpha-value-notation": null,
|
|
14
|
-
"color-function-notation": null,
|
|
15
|
-
"hue-degree-notation": null,
|
|
16
|
-
"value-keyword-case": null,
|
|
17
|
-
|
|
18
|
-
"no-descending-specificity": null,
|
|
19
|
-
"declaration-block-single-line-max-declarations": null,
|
|
20
|
-
"shorthand-property-no-redundant-values": null,
|
|
21
|
-
"font-family-name-quotes": null,
|
|
22
|
-
"property-no-vendor-prefix": null,
|
|
23
|
-
|
|
24
|
-
"scss/at-mixin-argumentless-call-parentheses": null,
|
|
25
|
-
"scss/at-mixin-pattern": null,
|
|
26
|
-
"scss/at-if-closing-brace-newline-after": null,
|
|
27
|
-
"scss/at-if-closing-brace-space-after": null,
|
|
28
|
-
"scss/at-if-no-null": null,
|
|
29
|
-
"scss/at-else-empty-line-before": null,
|
|
30
|
-
"scss/double-slash-comment-empty-line-before": null,
|
|
31
|
-
"scss/double-slash-comment-whitespace-inside": null,
|
|
32
|
-
"scss/dollar-variable-empty-line-before": null,
|
|
33
|
-
"scss/dollar-variable-colon-space-after": null,
|
|
34
|
-
"scss/operator-no-unspaced": null,
|
|
35
|
-
"declaration-empty-line-before": null,
|
|
36
|
-
"rule-empty-line-before": null,
|
|
37
|
-
"at-rule-empty-line-before": null,
|
|
38
|
-
"comment-empty-line-before": null,
|
|
39
|
-
"scss/comment-no-empty": null
|
|
40
|
-
}
|
|
41
|
-
}
|
package/scss/API.md
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
# Zeus CSS — Public API Surface (v1.0.0)
|
|
2
|
-
|
|
3
|
-
This document is the semver contract. Everything listed here is **public and
|
|
4
|
-
stable**: it will not change or be removed except in a major version bump
|
|
5
|
-
(`2.0.0`), following [Semantic Versioning](https://semver.org/). Everything
|
|
6
|
-
*not* listed here — including anything explicitly marked "internal" below —
|
|
7
|
-
is free to change in a minor or patch release without notice.
|
|
8
|
-
|
|
9
|
-
Generated references (`llms.txt`, `cheatsheet.md`, `zeus.tokens.json`) are
|
|
10
|
-
regenerated from source on every `npm run prepack` and always reflect the
|
|
11
|
-
current public surface described here. If they ever disagree with this file,
|
|
12
|
-
this file wins.
|
|
13
|
-
|
|
14
|
-
## 1. Entry points
|
|
15
|
-
|
|
16
|
-
| Import | Emits CSS? | Use in |
|
|
17
|
-
|---|---|---|
|
|
18
|
-
| `import "zeus-css/css";` | Yes — precompiled, default tokens only, not customizable | App root, no Sass pipeline |
|
|
19
|
-
| `import "zeus-css/min";` | Yes — same as above, minified | App root, no Sass pipeline, production |
|
|
20
|
-
| `@use "zeus-css/foundation";` | Yes — full compiled framework | App root, once, Sass pipeline |
|
|
21
|
-
| `@use "zeus-css/zeus" as *;` | No — mixins/functions only | Every `.module.scss` |
|
|
22
|
-
| `@use "zeus-css/config";` | No | Only if you need raw access to `$zeus-*` config variables |
|
|
23
|
-
| `@use "zeus-css/customize";` | No | Only if you need raw access to `$zeus-colors` etc. without the rest of config |
|
|
24
|
-
|
|
25
|
-
`zeus-css/css` and `zeus-css/min` are static builds of `foundation.scss` with
|
|
26
|
-
default tokens baked in at publish time (`npm run build:css`) — they cannot
|
|
27
|
-
reflect `zeus.customize.scss` overrides. Use one of the two SCSS entry points
|
|
28
|
-
below instead if you need custom tokens.
|
|
29
|
-
|
|
30
|
-
`package.json` → `files` is the authoritative list of what ships: the
|
|
31
|
-
`foundation/**/*.scss` tree, the six entry points above (plus their compiled
|
|
32
|
-
`dist/` output), `zeus.tokens.json`, `llms.txt`, `cheatsheet.md`, `LICENSE`,
|
|
33
|
-
`README.md`, `CHANGELOG.md`. Anything under `foundation/` not reachable
|
|
34
|
-
through `foundation` or `zeus` (see §6) is an implementation detail even
|
|
35
|
-
though the file ships.
|
|
36
|
-
|
|
37
|
-
## 2. Config variables (`zeus.config.scss`, `zeus.customize.scss`)
|
|
38
|
-
|
|
39
|
-
Every `!default` variable in these two files is public: name, accepted
|
|
40
|
-
values/shape, and default value are all part of the contract.
|
|
41
|
-
|
|
42
|
-
**Feature toggles** — `$zeus-enable-responsive-classes`, `$zeus-enable-animation-classes`,
|
|
43
|
-
`$zeus-enable-grid-system`, `$zeus-enable-shadow-classes`,
|
|
44
|
-
`$zeus-enable-color-utilities`, `$zeus-enable-property-registration`.
|
|
45
|
-
|
|
46
|
-
**Naming & compile strategy** — `$zeus-use-prefix`, `$zeus-class-prefix`,
|
|
47
|
-
`$zeus-version`. All responsive utilities are mobile-first (`min-width`);
|
|
48
|
-
there is no desktop-first mode and no config knob for one — see CHANGELOG
|
|
49
|
-
for the removal rationale.
|
|
50
|
-
|
|
51
|
-
**Fluid engine bounds** — `$zeus-container-bounds`, `$zeus-root-font-size`,
|
|
52
|
-
`$zeus-focus-ring`.
|
|
53
|
-
|
|
54
|
-
**Layout** — `$zeus-outer-max-width`, `$zeus-breakpoints`, `$zeus-outer-padding`,
|
|
55
|
-
`$zeus-column-gaps`.
|
|
56
|
-
|
|
57
|
-
**Design tokens** (`zeus.customize.scss`, forwarded through `zeus.config.scss`)
|
|
58
|
-
— `$zeus-colors`, and every other token map documented inline in that file
|
|
59
|
-
(typography, spacing, radii, border widths, icon sizes, shadows, z-index).
|
|
60
|
-
Reference values for every key: `zeus.token.sets.example.scss`.
|
|
61
|
-
|
|
62
|
-
Any Sass map above may have individual keys overridden without providing the
|
|
63
|
-
whole map — that merge behavior is itself part of the contract.
|
|
64
|
-
|
|
65
|
-
## 3. Public mixins & functions
|
|
66
|
-
|
|
67
|
-
Everything forwarded by `foundation/core/design`, `foundation/core/engine`,
|
|
68
|
-
and `foundation/core/api` — i.e. everything reachable via
|
|
69
|
-
`@use "zeus" as *`. The full catalog with signatures lives in
|
|
70
|
-
[`llms.txt`](llms.txt) / [`cheatsheet.md`](cheatsheet.md) (auto-generated, do
|
|
71
|
-
not hand-edit). Highlights: `padding()`, `margin()`, `gap()`, `border-radius()`,
|
|
72
|
-
`border-line()`, `box-size()`, `text()`, `color()`, `zeus-theme()`,
|
|
73
|
-
`apply-shadow()` / `elevation()` / `hover-shadow()` / `card-shadow()` / the
|
|
74
|
-
rest of the shadow mixin family, `screen-above()` / `screen-below()` /
|
|
75
|
-
`screen-between()` / `suppress-on()`, `fade-in()` / `slide-in()` / `scale()` /
|
|
76
|
-
`bounce()` / `pulse()` / `rotate()`, the `btn-*` mixin family, and the `p()` /
|
|
77
|
-
`m()` / `g()` / `r()` / `t()` / `sz()` shorthand aliases.
|
|
78
|
-
|
|
79
|
-
**Internal, not public** — anything whose name starts with `_` (e.g.
|
|
80
|
-
`_z-control-base`, `_emit-static-color-vars`, `_register-color-tokens`),
|
|
81
|
-
and every function/mixin in `foundation/core/engine/_fluid-core.scss`, whose
|
|
82
|
-
file header explicitly states it is private. `gen-cheatsheet.mjs` already
|
|
83
|
-
excludes these from the generated catalog for the same reason.
|
|
84
|
-
|
|
85
|
-
## 4. Public utility class families
|
|
86
|
-
|
|
87
|
-
Every class family listed in [`llms.txt`](llms.txt) / [`cheatsheet.md`](cheatsheet.md)
|
|
88
|
-
under "Utility Class Families" — layout (`flex-*`, `grid-*`, `d-*`), spacing
|
|
89
|
-
(`gap-*`), color (`bg-*`, `color-*`, `border-color-*`), typography (`text-*`),
|
|
90
|
-
shadows (`shadow-*`), borders (`border-radius-*`, `border-line-*`), sizing
|
|
91
|
-
(`w-*`, `h-*`, `min-w-*`, `max-w-*`, `box-*`, `icon-*`), position (`static`,
|
|
92
|
-
`relative`, `absolute`, `fixed`, `sticky`, `inset-*`, `top-*`, `bottom-*`,
|
|
93
|
-
`inset-inline-start-*`, `inset-inline-end-*`), z-index (`layer-*`), animation
|
|
94
|
-
(`animate-*`, `delay-*`, `duration-*`), aspect ratio (`aspect-*`), opacity
|
|
95
|
-
(`opacity-*`), flex-grow/shrink/order, overflow/object-fit, responsive
|
|
96
|
-
visibility (`hidden-*`), the compound utility classes (`surface`,
|
|
97
|
-
`surface-flat`, `section-wrap`, `section-wrap-narrow`, `glass`, `divider`,
|
|
98
|
-
`sr-only`, `truncate`, `line-clamp-*`, `highlight`, `article`), `.container`,
|
|
99
|
-
and the `btn-*` button classes. (Renamed from the `zeus-*` prefix —
|
|
100
|
-
`.z-*` is reserved exclusively for the framework's fixed BEM components —
|
|
101
|
-
card, modal, form controls — which do NOT participate in
|
|
102
|
-
`$zeus-use-prefix`.)
|
|
103
|
-
|
|
104
|
-
When `$zeus-use-prefix: true`, every class in this list is emitted with
|
|
105
|
-
`$zeus-class-prefix` prepended — the prefixing behavior itself is part of the
|
|
106
|
-
contract, not just the unprefixed names.
|
|
107
|
-
|
|
108
|
-
## 5. Public components (`foundation/views/components/`)
|
|
109
|
-
|
|
110
|
-
These class-based components and their documented modifiers:
|
|
111
|
-
|
|
112
|
-
- **`.z-card`**, `.z-card__media` and the modifiers documented in `_card.scss`
|
|
113
|
-
- **`.z-modal-backdrop`**, `.z-modal`
|
|
114
|
-
- **`.z-field`**, `.z-field--invalid`, `.z-field-group`, `.z-field__helper`,
|
|
115
|
-
`.z-field__error`, `.z-label`, `.z-label--required`, `.z-input`,
|
|
116
|
-
`.z-textarea`, `.z-select`, `.z-checkbox`, `.z-radio`
|
|
117
|
-
- **`.z-badge`** — variants `--primary/--secondary/--accent/--success/
|
|
118
|
-
--warning/--error`, modifier `--solid`, element `.z-badge__dot`
|
|
119
|
-
- **`.z-alert`**, **`.z-avatar`** (+ `.z-avatar-group`), **`.z-table`**,
|
|
120
|
-
**`.z-breadcrumb`**, **`.z-pagination`** — variants/elements as documented
|
|
121
|
-
in their respective partials
|
|
122
|
-
- **`.z-tabs`** — `.z-tabs__list`, `.z-tabs__tab`, `.z-tabs__panel`. State is
|
|
123
|
-
driven by the native `aria-selected` / `hidden` attributes; which tab is
|
|
124
|
-
selected is the consumer's to manage (Zeus ships no JS).
|
|
125
|
-
- **`.z-tooltip`**, **`.z-dropdown`** (+ `.z-dropdown__list/__item/__divider`,
|
|
126
|
-
`__item--danger`) — built on the native `popover` attribute and CSS anchor
|
|
127
|
-
positioning. See README "Browser support": absence of anchor positioning
|
|
128
|
-
degrades placement only. Hover-triggered tooltips need consumer JS;
|
|
129
|
-
`popovertarget` alone gives click-to-toggle.
|
|
130
|
-
- **`.z-toast-region`** + **`.z-toast`** (+ `__icon/__body/__title/__message/
|
|
131
|
-
__close`, variants `--success/--warning/--danger/--info`) — the region is
|
|
132
|
-
`popover="manual"`; auto-dismiss timing is the consumer's.
|
|
133
|
-
- **`.z-skeleton`** — modifiers `--text/--title/--avatar/--block`
|
|
134
|
-
|
|
135
|
-
The private `_z-control-base()` mixin these share is an implementation
|
|
136
|
-
detail (§3) — only the class names and their documented states (default,
|
|
137
|
-
hover, `:focus-visible`, `:disabled`, invalid) are guaranteed.
|
|
138
|
-
|
|
139
|
-
## 6. Public design tokens (CSS custom properties)
|
|
140
|
-
|
|
141
|
-
Every CSS custom property emitted by `foundation` (the `--color-*`,
|
|
142
|
-
`--space-*`, `--text-*`, `--shadow-*`, `--border-radius-*`, `--border-line-*`,
|
|
143
|
-
`--size-icon-*`, `--z-*`, and responsive `--*` vars declared in
|
|
144
|
-
`zeus.customize.scss`) is public. The canonical, always-current list — name,
|
|
145
|
-
value, and type — is generated straight from the compiled CSS into
|
|
146
|
-
[`zeus.tokens.json`](zeus.tokens.json) (W3C Design Tokens format) by
|
|
147
|
-
`npm run gen:tokens`; nothing in that file is hand-maintained, so it cannot
|
|
148
|
-
drift from what actually ships.
|
|
149
|
-
|
|
150
|
-
## 7. What is explicitly NOT public
|
|
151
|
-
|
|
152
|
-
- Anything under `foundation/views/render/` other than the class names listed
|
|
153
|
-
in §4 — the internal `load-*` mixins, file layout, and forward chain are
|
|
154
|
-
free to change.
|
|
155
|
-
- `foundation/core/engine/_fluid-core.scss` and any `_`-prefixed
|
|
156
|
-
mixin/function anywhere in the tree (§3).
|
|
157
|
-
- The internal cascade-layer wiring (`_layer-order.scss`) and the fact that
|
|
158
|
-
it must forward first — an implementation detail of how layers get their
|
|
159
|
-
order, not something consumers should depend on directly.
|
|
160
|
-
- `scripts/*.mjs` (token/cheatsheet generators, and the compile-matrix test
|
|
161
|
-
suite) — tooling, not shipped API.
|
|
162
|
-
- File/folder structure inside `foundation/` beyond the two entry points —
|
|
163
|
-
files may be split, merged, or moved as long as the public mixins,
|
|
164
|
-
functions, classes, and tokens above keep working identically.
|
|
165
|
-
|
|
166
|
-
## 8. Versioning commitment
|
|
167
|
-
|
|
168
|
-
Starting at `1.0.0`: no breaking change to anything in §1–§6 without a major
|
|
169
|
-
version bump. A breaking change is any of — a public mixin/function being
|
|
170
|
-
renamed, removed, or changing its required arguments; a public class being
|
|
171
|
-
renamed or removed; a public CSS custom property being renamed, removed, or
|
|
172
|
-
changing what it resolves to for the same config; a config variable's name,
|
|
173
|
-
accepted values, or default changing. Adding new mixins, functions, classes,
|
|
174
|
-
tokens, or config keys is a minor release. Bug fixes that don't change the
|
|
175
|
-
above are patch releases.
|
package/scss/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Stavros Kosmas Lazaris
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/scss/README.md
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
# ⚡ Zeus CSS
|
|
2
|
-
|
|
3
|
-
Zeus is a fluid-first SCSS design system. Every size, space, and font size scales
|
|
4
|
-
smoothly between a mobile floor and a desktop ceiling using native CSS
|
|
5
|
-
`clamp()` driven by container-query units (`cqi`) — no breakpoint jumps, no
|
|
6
|
-
`calc()` guesswork. Colors are OKLCH-based semantic tokens with automatic
|
|
7
|
-
light/dark derivation. The whole system is expressed as plain Sass maps, which
|
|
8
|
-
makes it easy for both humans and AI coding assistants to read, extend, and
|
|
9
|
-
reason about.
|
|
10
|
-
|
|
11
|
-
- **Fluid by default** — `clamp()` scaling for spacing, type, radii, borders, icons.
|
|
12
|
-
- **Semantic OKLCH tokens** — define 5 base colors, get light/dark/muted/border variants derived automatically.
|
|
13
|
-
- **Cascade layers** — `reset → tokens → base → layout → components → utilities`, so utility classes always win without `!important`.
|
|
14
|
-
- **Zero-emission module entry** — `@use "zeus" as *` in a component's `.module.scss` gives you every mixin/function with **no** leaked CSS.
|
|
15
|
-
- **Config-first** — every token lives in one file you can override; nothing is hardcoded past that boundary.
|
|
16
|
-
|
|
17
|
-
## Browser support
|
|
18
|
-
|
|
19
|
-
Zeus targets evergreen browsers only — there is no fallback path for the core
|
|
20
|
-
and none is planned. There is no IE11, no legacy Safari, and no polyfill
|
|
21
|
-
story: if you need to support browsers older than ~2023, Zeus is not the
|
|
22
|
-
right choice.
|
|
23
|
-
|
|
24
|
-
**Required (the whole framework depends on these).** Cascade layers
|
|
25
|
-
(`@layer`), container query units (`cqi`, `container-type`), `@property`,
|
|
26
|
-
relative color syntax (`oklch(from …)`), `:has()`, `color-mix()`. All are
|
|
27
|
-
Baseline "Widely available" in current Chrome/Edge, Firefox, and Safari.
|
|
28
|
-
|
|
29
|
-
**Progressive enhancement (a few components use these and degrade if
|
|
30
|
-
absent).** These are *not* uniformly Baseline — check current support for
|
|
31
|
-
your targets rather than assuming:
|
|
32
|
-
|
|
33
|
-
| Feature | Used by | Without it you get |
|
|
34
|
-
| --- | --- | --- |
|
|
35
|
-
| `popover` attribute | `.z-tooltip`, `.z-dropdown`, `.z-toast-region` | No top-layer rendering or light-dismiss — these three need it to function; verify support before relying on them |
|
|
36
|
-
| CSS anchor positioning (`position-anchor`, `position-area`) | `.z-tooltip`, `.z-dropdown` | Still a fully working popover, just placed by the UA default instead of anchored to its trigger |
|
|
37
|
-
| `@starting-style`, `transition-behavior: allow-discrete` | `.z-tooltip`, `.z-dropdown` enter/exit | Instant show/hide instead of a fade — purely cosmetic |
|
|
38
|
-
|
|
39
|
-
Anchor positioning has the narrowest support of the three (Chromium shipped
|
|
40
|
-
it well ahead of the other engines). The components are written so its
|
|
41
|
-
absence costs placement, never functionality.
|
|
42
|
-
|
|
43
|
-
## Install
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npm install zeus-css
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
No Sass pipeline and no customization needed? Import the precompiled CSS
|
|
50
|
-
once, at your app root, and skip everything below about entry points and
|
|
51
|
-
theming:
|
|
52
|
-
|
|
53
|
-
```tsx
|
|
54
|
-
// app/layout.tsx
|
|
55
|
-
import "zeus-css/css"; // or "zeus-css/dist/zeus.css" / "zeus-css/min" for the minified build
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Two ways to consume Zeus — pick one
|
|
59
|
-
|
|
60
|
-
These are **mutually exclusive** at the app-root level. Never load both in
|
|
61
|
-
the same project.
|
|
62
|
-
|
|
63
|
-
| | No Sass pipeline | Sass pipeline (Next.js, Vite, webpack `sass-loader`) |
|
|
64
|
-
|---|---|---|
|
|
65
|
-
| **Import** | `zeus-css/css` (plain compiled CSS) | `@use "zeus-css/foundation"` |
|
|
66
|
-
| **Customizable?** | No — ships the default token values baked in | Yes — edit `zeus.customize.scss` first (see [Theming your brand](#theming-your-brand)) |
|
|
67
|
-
| **Use when** | You just want the framework as-is, no build step | You want your own brand colors/type/spacing |
|
|
68
|
-
|
|
69
|
-
If you don't need custom theming, skip straight to
|
|
70
|
-
[Install](#install) and use the plain CSS import. If you *do* need custom
|
|
71
|
-
theming, use the SCSS entry point — the precompiled CSS can't reflect your
|
|
72
|
-
overrides, since it was built once, at publish time, with the default tokens.
|
|
73
|
-
|
|
74
|
-
## Two entry points (SCSS pipeline)
|
|
75
|
-
|
|
76
|
-
Once you're on the SCSS path, Zeus exposes two distinct entry points — pick the right one per file.
|
|
77
|
-
|
|
78
|
-
### 1. Global stylesheet — `foundation`
|
|
79
|
-
|
|
80
|
-
Import **once**, at your app root. Emits the full compiled CSS: reset, design
|
|
81
|
-
tokens as CSS custom properties, typography base, and every utility class
|
|
82
|
-
(`.padding-lg`, `.text-h1`, `.grid-cols-3`, …).
|
|
83
|
-
|
|
84
|
-
```scss
|
|
85
|
-
// app/globals.scss
|
|
86
|
-
@use "zeus-css/foundation";
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 2. Component modules — `zeus`
|
|
90
|
-
|
|
91
|
-
Import in **every** `.module.scss` component file. Exposes all mixins and
|
|
92
|
-
functions (`@include padding(...)`, `@include text(...)`, `color(...)`, …) but
|
|
93
|
-
emits **zero** CSS of its own — only the rules you actually write.
|
|
94
|
-
|
|
95
|
-
```scss
|
|
96
|
-
// Button.module.scss
|
|
97
|
-
@use "zeus-css/zeus" as *;
|
|
98
|
-
|
|
99
|
-
.button {
|
|
100
|
-
@include padding("md", "x");
|
|
101
|
-
@include text("button");
|
|
102
|
-
@include border-radius("sm");
|
|
103
|
-
background: color("primary");
|
|
104
|
-
color: var(--color-text-inverse);
|
|
105
|
-
|
|
106
|
-
&:hover {
|
|
107
|
-
background: color("primary-dark");
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## 5-minute quickstart
|
|
113
|
-
|
|
114
|
-
```scss
|
|
115
|
-
// 1. app/globals.scss — load the framework once
|
|
116
|
-
@use "zeus-css/foundation";
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
```tsx
|
|
120
|
-
// 2. app/layout.tsx — import the global stylesheet
|
|
121
|
-
import "./globals.scss";
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
```scss
|
|
125
|
-
// 3. components/Card.module.scss — build a component with the API
|
|
126
|
-
@use "zeus-css/zeus" as *;
|
|
127
|
-
|
|
128
|
-
.card {
|
|
129
|
-
@include padding("lg");
|
|
130
|
-
@include border-radius("md");
|
|
131
|
-
@include card-shadow();
|
|
132
|
-
background: var(--color-surface);
|
|
133
|
-
border: var(--border-line-xs) solid var(--color-border);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.title {
|
|
137
|
-
@include text("h4");
|
|
138
|
-
color: var(--color-text);
|
|
139
|
-
}
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
```tsx
|
|
143
|
-
// components/Card.tsx
|
|
144
|
-
import styles from "./Card.module.scss";
|
|
145
|
-
|
|
146
|
-
export function Card({ children }: { children: React.ReactNode }) {
|
|
147
|
-
return <div className={styles.card}>{children}</div>;
|
|
148
|
-
}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
That's it — no build config, no PostCSS plugin. Zeus compiles with any
|
|
152
|
-
standard Dart Sass pipeline (Next.js, Vite, webpack `sass-loader`, or the
|
|
153
|
-
`sass` CLI directly).
|
|
154
|
-
|
|
155
|
-
## Theming your brand
|
|
156
|
-
|
|
157
|
-
> ⚠️ Only relevant if you're on the **Sass pipeline** path above. If you
|
|
158
|
-
> imported the plain `zeus-css/css` build, there is nothing to configure here
|
|
159
|
-
> — remove that import first, then follow the steps below instead. Don't use
|
|
160
|
-
> both.
|
|
161
|
-
|
|
162
|
-
Every visual token — colors, typography, spacing, radii, shadows, breakpoints
|
|
163
|
-
— lives in **one file**: `zeus.customize.scss`. Copy the keys you want to
|
|
164
|
-
override from `zeus.token.sets.example.scss` (a reference-only file, never
|
|
165
|
-
imported) into your own `zeus.customize.scss` before the `@use` chain resolves.
|
|
166
|
-
Then compile through `@use "zeus-css/foundation"` as shown in
|
|
167
|
-
[Global stylesheet — foundation](#1-global-stylesheet--foundation) — your
|
|
168
|
-
overrides are baked into the CSS your own Sass pipeline emits.
|
|
169
|
-
|
|
170
|
-
```scss
|
|
171
|
-
// zeus.customize.scss
|
|
172
|
-
$zeus-colors: (
|
|
173
|
-
"primary": oklch(60% 0.2 250),
|
|
174
|
-
"primary-light": oklch(75% 0.15 250),
|
|
175
|
-
"primary-dark": oklch(45% 0.25 250),
|
|
176
|
-
// ...
|
|
177
|
-
);
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Layout/engine behavior (prefixing, responsive strategy, fluid viewport bounds)
|
|
181
|
-
lives in `zeus.config.scss` — separate from design tokens on purpose, so
|
|
182
|
-
brand changes and structural changes never collide in the same diff.
|
|
183
|
-
|
|
184
|
-
## Learn more
|
|
185
|
-
|
|
186
|
-
- `zeus.token.sets.example.scss` — full reference of every default token value.
|
|
187
|
-
- `CHANGELOG.md` — what changed between versions.
|
|
188
|
-
- `API.md` — the full public API surface: entry points, config variables,
|
|
189
|
-
mixins/functions, utility classes, components, and design tokens.
|
|
190
|
-
|
|
191
|
-
## License
|
|
192
|
-
|
|
193
|
-
MIT © Stavros Kosmas Lazaris
|