zeus-css 1.0.0
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/README.md +81 -0
- package/bin/init.js +89 -0
- package/dist/zeus.css +8456 -0
- package/dist/zeus.min.css +1 -0
- package/package.json +44 -0
- package/scss/.stylelintrc.json +41 -0
- package/scss/API.md +168 -0
- package/scss/CHANGELOG.md +281 -0
- package/scss/LICENSE +21 -0
- package/scss/README.md +160 -0
- package/scss/cheatsheet.md +249 -0
- package/scss/dist/zeus.css +8465 -0
- package/scss/dist/zeus.css.map +1 -0
- package/scss/dist/zeus.min.css +1 -0
- package/scss/dist/zeus.min.css.map +1 -0
- package/scss/foundation/core/_api.scss +10 -0
- package/scss/foundation/core/_design.scss +33 -0
- package/scss/foundation/core/_engine.scss +18 -0
- package/scss/foundation/core/buttons/variants.scss +72 -0
- package/scss/foundation/core/design/_design-system.scss +41 -0
- package/scss/foundation/core/design/_validate.scss +114 -0
- package/scss/foundation/core/design/borders/border-line.scss +29 -0
- package/scss/foundation/core/design/borders/border-radius.scss +31 -0
- package/scss/foundation/core/design/buttons/sizes.scss +32 -0
- package/scss/foundation/core/design/colors/_color-derivation.scss +80 -0
- package/scss/foundation/core/design/colors/base-colors.scss +31 -0
- package/scss/foundation/core/design/colors/semantic-colors.scss +130 -0
- package/scss/foundation/core/design/core/basic.scss +40 -0
- package/scss/foundation/core/design/dimensions/sizes.scss +29 -0
- package/scss/foundation/core/design/dimensions/spaces.scss +42 -0
- package/scss/foundation/core/design/effects/_z-index.scss +30 -0
- package/scss/foundation/core/design/effects/shadows.scss +65 -0
- package/scss/foundation/core/design/layout/grid.scss +86 -0
- package/scss/foundation/core/design/typography/typography.scss +435 -0
- package/scss/foundation/core/engine/_fluid-core.scss +54 -0
- package/scss/foundation/core/engine/animations.scss +91 -0
- package/scss/foundation/core/engine/buttons.scss +226 -0
- package/scss/foundation/core/engine/color-api.scss +37 -0
- package/scss/foundation/core/engine/helpers.scss +39 -0
- package/scss/foundation/core/engine/layout.scss +156 -0
- package/scss/foundation/core/engine/responsive.scss +67 -0
- package/scss/foundation/core/engine/shadows.scss +186 -0
- package/scss/foundation/core/engine/shortcuts.scss +30 -0
- package/scss/foundation/core/engine/sizing.scss +49 -0
- package/scss/foundation/core/engine/theme-builder.scss +83 -0
- package/scss/foundation/core/engine/typographics.scss +44 -0
- package/scss/foundation/core/engine/typography-calc.scss +71 -0
- package/scss/foundation/foundation.scss +29 -0
- package/scss/foundation/views/_render.scss +13 -0
- package/scss/foundation/views/components/_alert.scss +103 -0
- package/scss/foundation/views/components/_avatar.scss +84 -0
- package/scss/foundation/views/components/_badge.scss +100 -0
- package/scss/foundation/views/components/_breadcrumb.scss +70 -0
- package/scss/foundation/views/components/_card.scss +117 -0
- package/scss/foundation/views/components/_dropdown.scss +123 -0
- package/scss/foundation/views/components/_form.scss +209 -0
- package/scss/foundation/views/components/_index.scss +20 -0
- package/scss/foundation/views/components/_modal.scss +138 -0
- package/scss/foundation/views/components/_pagination.scss +82 -0
- package/scss/foundation/views/components/_skeleton.scss +69 -0
- package/scss/foundation/views/components/_table.scss +94 -0
- package/scss/foundation/views/components/_tabs.scss +96 -0
- package/scss/foundation/views/components/_toast.scss +139 -0
- package/scss/foundation/views/components/_tooltip.scss +100 -0
- package/scss/foundation/views/patterns/_hero.scss +121 -0
- package/scss/foundation/views/patterns/_index.scss +8 -0
- package/scss/foundation/views/patterns/_sidebar-layout.scss +83 -0
- package/scss/foundation/views/render/_layer-order.scss +11 -0
- package/scss/foundation/views/render/classes/_animations.scss +233 -0
- package/scss/foundation/views/render/classes/_aspect-ratio.scss +17 -0
- package/scss/foundation/views/render/classes/_borders.scss +31 -0
- package/scss/foundation/views/render/classes/_buttons.scss +40 -0
- package/scss/foundation/views/render/classes/_colors.scss +83 -0
- package/scss/foundation/views/render/classes/_compounds.scss +103 -0
- package/scss/foundation/views/render/classes/_containers.scss +20 -0
- package/scss/foundation/views/render/classes/_misc-utils.scss +51 -0
- package/scss/foundation/views/render/classes/_position.scss +56 -0
- package/scss/foundation/views/render/classes/_sections.scss +30 -0
- package/scss/foundation/views/render/classes/_shadows.scss +198 -0
- package/scss/foundation/views/render/classes/_sizes.scss +39 -0
- package/scss/foundation/views/render/classes/_sizing-utils.scss +53 -0
- package/scss/foundation/views/render/classes/_spacing.scss +91 -0
- package/scss/foundation/views/render/classes/_state-variants.scss +47 -0
- package/scss/foundation/views/render/classes/_typography.scss +32 -0
- package/scss/foundation/views/render/classes/_utilities.scss +103 -0
- package/scss/foundation/views/render/classes/_z-index.scss +22 -0
- package/scss/foundation/views/render/classes/flexbox.scss +56 -0
- package/scss/foundation/views/render/classes/grid.scss +195 -0
- package/scss/foundation/views/render/classes.scss +116 -0
- package/scss/foundation/views/render/html-body.scss +54 -0
- package/scss/foundation/views/render/property-registration.scss +77 -0
- package/scss/foundation/views/render/reset.scss +147 -0
- package/scss/foundation/views/render/root-generator.scss +166 -0
- package/scss/foundation/views/render/root.scss +19 -0
- package/scss/foundation/views/render/typography.scss +129 -0
- package/scss/llms.txt +247 -0
- package/scss/package.json +89 -0
- package/scss/scripts/gen-cheatsheet.mjs +178 -0
- package/scss/scripts/gen-tokens.mjs +91 -0
- package/scss/scripts/test-compile.mjs +474 -0
- package/scss/zeus.config.scss +99 -0
- package/scss/zeus.customize.scss +246 -0
- package/scss/zeus.scss +17 -0
- package/scss/zeus.token.sets.example.scss +176 -0
- package/scss/zeus.tokens.json +687 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Zeus CSS are documented here. This project follows
|
|
4
|
+
[Semantic Versioning](https://semver.org/) against the public API surface
|
|
5
|
+
documented in [`API.md`](API.md).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
Working toward the `1.0.0` tag — not yet published (no npm release, no git
|
|
10
|
+
tag exists as of this entry). [`API.md`](API.md) documents the intended
|
|
11
|
+
public API surface; semver will become binding once `1.0.0` is actually
|
|
12
|
+
published, not before.
|
|
13
|
+
|
|
14
|
+
### Removed (since first written)
|
|
15
|
+
- **Dark mode**, entirely — `$zeus-dark-mode-strategy` and
|
|
16
|
+
`$zeus-enable-auto-dark-mode` (both mentioned as "Added" just below when
|
|
17
|
+
this entry was still labeled `1.0.0`) no longer exist. Architecture
|
|
18
|
+
decision: the framework ships one fixed, WCAG-passing light palette;
|
|
19
|
+
`semantic-colors.scss` emits a single `:root` block, no strategy branching.
|
|
20
|
+
- `$zeus-breakpoint-strategy` and its `"desktop-first"` reserved value —
|
|
21
|
+
removed rather than implemented; only mobile-first ever existed as a real
|
|
22
|
+
strategy, so the config knob offered no real choice. See `API.md`.
|
|
23
|
+
- The `.zeus-*` utility class prefix — renamed to bare class names
|
|
24
|
+
(`.surface`, `.glass`, `.sr-only`, etc.); `.z-*` is now reserved
|
|
25
|
+
exclusively for the framework's fixed BEM components (card, modal, form
|
|
26
|
+
controls) and does not participate in `$zeus-use-prefix`.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
- **Component library, 3 → 14 components.** Phase 1: `.z-badge`, `.z-alert`,
|
|
30
|
+
`.z-avatar` (+ `.z-avatar-group`), `.z-table`, `.z-breadcrumb`,
|
|
31
|
+
`.z-pagination`. Phase 2: `.z-tabs`, `.z-tooltip`, `.z-dropdown`,
|
|
32
|
+
`.z-toast-region`/`.z-toast`, `.z-skeleton` — the floating ones built on the
|
|
33
|
+
native `popover` attribute plus CSS anchor positioning (same
|
|
34
|
+
"let the platform do it" approach as `.z-modal`'s `<dialog>`), with
|
|
35
|
+
`prefers-reduced-motion` guards and graceful degradation when anchor
|
|
36
|
+
positioning is unavailable. All are listed in [`API.md`](API.md) §5 and
|
|
37
|
+
therefore covered by the semver contract.
|
|
38
|
+
- **`derive-on-color()`** (`design/colors/_color-derivation.scss`) — derives a
|
|
39
|
+
readable foreground for text sitting on any brand color by switching on that
|
|
40
|
+
color's OKLCH lightness, entirely in CSS so it keeps following runtime
|
|
41
|
+
overrides. Fixes `.z-badge--solid`, which previously hardcoded white text
|
|
42
|
+
and so shipped 2.20:1 on the default secondary, 2.34:1 on warning and
|
|
43
|
+
2.79:1 on success. All six solid variants now clear WCAG AA
|
|
44
|
+
(4.55–7.40:1, browser-verified). Documented non-guarantee: a single
|
|
45
|
+
lightness threshold cannot clear AA for *every* possible input color.
|
|
46
|
+
- **CI hardening** (`scripts/test-compile.mjs`, 4 → 8 checks) — public-API
|
|
47
|
+
smoke test that invokes every public mixin/function, config-variable usage
|
|
48
|
+
analysis (catches orphaned config surface), CLI-bridge template integrity,
|
|
49
|
+
and a WCAG AA contrast regression guard over all 10 shipped color pairings.
|
|
50
|
+
- **Form components** (`_form.scss`): `.z-field`, `.z-label`, `.z-input`,
|
|
51
|
+
`.z-textarea`, `.z-select`, `.z-checkbox`, `.z-radio`, `.z-field-group`, with
|
|
52
|
+
hover/`:focus-visible`/`:disabled`/invalid states, native `accent-color`
|
|
53
|
+
theming for checkboxes/radios, and a CSS-only select chevron.
|
|
54
|
+
- **Z-index scale** — `$zeus-z-index` config map, `--z-*` custom properties,
|
|
55
|
+
and `.layer-{name}` utility classes; `.z-modal`/`.z-modal-backdrop` now use
|
|
56
|
+
the scale instead of hardcoded `z-index: 999/1000`.
|
|
57
|
+
- New utility class families: sizing (`w-*`, `h-*`, `min-w-*`, `max-w-*`,
|
|
58
|
+
fraction widths), position (`static`/`relative`/`absolute`/`fixed`/`sticky`,
|
|
59
|
+
`inset-*`, `top-*`/`bottom-*`, logical `inset-inline-start/end-*`), misc
|
|
60
|
+
(`opacity-*` in steps of 5, `overflow-*`, `object-*`, `flex-grow/shrink-*`,
|
|
61
|
+
`order-*`), and `hover:`/`focus:` state variants for every `bg-*`/`color-*`/
|
|
62
|
+
`border-color-*` class.
|
|
63
|
+
- **`zeus.tokens.json`** — every design token (colors, spacing, typography,
|
|
64
|
+
shadows, radii, borders, icon sizes, z-index, custom vars) in W3C Design
|
|
65
|
+
Tokens format, generated straight from compiled CSS by `npm run gen:tokens`
|
|
66
|
+
so it cannot drift from what actually ships. Consumed live by the app's
|
|
67
|
+
`/tokens-reference` page.
|
|
68
|
+
- **`llms.txt` / `cheatsheet.md`** — auto-generated catalog of every public
|
|
69
|
+
mixin, function, and utility class family, via `npm run gen:cheatsheet`.
|
|
70
|
+
Both regenerate automatically on `npm run prepack`.
|
|
71
|
+
- **`scripts/test-compile.mjs`** — a 4-check compile matrix (default build,
|
|
72
|
+
module zero-emission, prefix build, config-override contract) using the
|
|
73
|
+
Sass JS API, run via `npm run test:compile`.
|
|
74
|
+
- **`.stylelintrc.json`** + `npm run lint:scss`, tuned to this codebase's
|
|
75
|
+
established conventions rather than generic defaults.
|
|
76
|
+
- A GitHub Actions workflow (`zeus-css-ci.yml`) running the compile matrix and
|
|
77
|
+
lint on every push/PR touching `zeus-css/**`.
|
|
78
|
+
- Shared color-derivation functions (`_color-derivation.scss`:
|
|
79
|
+
`derive-light`, `derive-dark`, `derive-surface`, `derive-muted`,
|
|
80
|
+
`derive-border`, `derive-border-strong`, `derive-surface-subtle`,
|
|
81
|
+
`derive-warning-subtle`) used by both `semantic-colors.scss` and
|
|
82
|
+
`theme-builder.scss`, closing the gap where `zeus-theme()` previously
|
|
83
|
+
produced incomplete token sets compared to the default palette.
|
|
84
|
+
- `API.md` — the documented public API surface required for a `1.0.0` tag.
|
|
85
|
+
|
|
86
|
+
### Changed
|
|
87
|
+
- Shadow presets (`primary`, `secondary`, `glow`, `glow-lg`, `outline`) now
|
|
88
|
+
derive from `var(--color-primary)` via `oklch(from ... l c h / N)` instead
|
|
89
|
+
of a hardcoded blue `rgba()`, so they follow custom brand colors.
|
|
90
|
+
- `col-start-*`/`col-end-*` grid utilities generated via `@for` loop instead
|
|
91
|
+
of hand-written rules.
|
|
92
|
+
|
|
93
|
+
### Fixed
|
|
94
|
+
- **`engine/shadows.scss`'s mixins didn't follow the codebase's own
|
|
95
|
+
CSS-Var-First pattern.** `padding()`/`border-radius()`/`text()` all
|
|
96
|
+
reference the already-emitted `:root` custom property (`var(--space-md)`,
|
|
97
|
+
etc.) instead of recomputing the value — documented as a deliberate
|
|
98
|
+
pattern in `layout.scss`/`typographics.scss`, for two reasons: the value
|
|
99
|
+
stays runtime-overridable (JS, `[data-theme]`), and the literal value
|
|
100
|
+
lives once instead of being repeated at every call site. Every shadow
|
|
101
|
+
mixin (`apply-shadow()`, `elevation()`, `hover-shadow()`, `focus-shadow()`,
|
|
102
|
+
`interactive-shadow()`, `card-shadow()`, `semantic-shadow()`,
|
|
103
|
+
`inner-shadow()`, `layered-shadow()`, `conditional-shadow()`) instead
|
|
104
|
+
called a Sass function (`shadow($key)`) that inlined the raw
|
|
105
|
+
`box-shadow` value at compile time — e.g. `.z-card` had a literal
|
|
106
|
+
`box-shadow: 0px 2px 8px 0px rgba(...), ...;` sitting right next to a
|
|
107
|
+
correctly-referenced `border-radius: var(--border-radius-md);`. A
|
|
108
|
+
component styled with `card-shadow()` would not pick up a runtime change
|
|
109
|
+
to `--shadow-card`, unlike every other token-driven mixin in the
|
|
110
|
+
framework. Added a private `_shadow-var($key)` helper
|
|
111
|
+
(`var(--shadow-#{$key})`) and switched all 16 call sites to it — same
|
|
112
|
+
compiled visual result under default config, now consistent with the
|
|
113
|
+
rest of the engine, and the repeated literal value is gone from the
|
|
114
|
+
compiled output (each shadow's value now appears once, at `:root`,
|
|
115
|
+
instead of once per component using it).
|
|
116
|
+
- **Focus indicators could disappear entirely under Windows High Contrast
|
|
117
|
+
Mode (`forced-colors`), a WCAG 2.4.7 Focus Visible risk.** Five call sites
|
|
118
|
+
removed the native focus outline (`outline: none`) and relied solely on
|
|
119
|
+
`box-shadow`/`border-color` to show `:focus-visible` —
|
|
120
|
+
`_form.scss`'s `_z-control-base()`, the `focus-shadow()`,
|
|
121
|
+
`interactive-shadow()`, and `conditional-shadow()` mixins in
|
|
122
|
+
`engine/shadows.scss`, and the `.focus:shadow-outline`/`.focus:shadow-primary`
|
|
123
|
+
utility classes. `forced-colors` mode strips `box-shadow` entirely, so
|
|
124
|
+
keyboard focus had no visible indicator left in that mode. Changed
|
|
125
|
+
`outline: none` to `outline: 2px solid transparent` at each site: fully
|
|
126
|
+
invisible in normal rendering (box-shadow remains the visible affordance),
|
|
127
|
+
but browsers paint outlines with a system color under `forced-colors`
|
|
128
|
+
regardless of the author-specified color, so focus stays visible exactly
|
|
129
|
+
when it's needed. `button-base-reset()` and the link reset in
|
|
130
|
+
`typography.scss` already used the correct pattern (`outline: revert` /
|
|
131
|
+
a real `outline` on `:focus-visible`) and needed no change.
|
|
132
|
+
- `btn-size()` emitted physical `padding-left`/`padding-right` for its
|
|
133
|
+
horizontal padding while every other spacing mixin in the framework already
|
|
134
|
+
uses logical properties — the one RTL leak in an otherwise RTL-clean
|
|
135
|
+
codebase. Now `padding-inline` (and, for consistency, `padding-block`
|
|
136
|
+
instead of `padding-top`/`padding-bottom`).
|
|
137
|
+
- `_tooltip.scss`'s anchor-positioning fallback comment claimed an
|
|
138
|
+
`@supports` guard "protects the whole feature" — no such block exists
|
|
139
|
+
anywhere in the codebase. The actual mechanism (browsers ignore the
|
|
140
|
+
unrecognized `position-anchor`/`position-area` values and fall back to
|
|
141
|
+
default top-layer placement) needed no guard; the comment now says so.
|
|
142
|
+
- `API.md` referenced `foundation/core/design/_fluid-core.scss` twice (§3,
|
|
143
|
+
§7) — the file has always lived in `foundation/core/engine/`.
|
|
144
|
+
- `API.md` §7 listed "the CI workflow" among excluded tooling; no CI workflow
|
|
145
|
+
exists in this repository. Reworded to reference the compile-matrix test
|
|
146
|
+
suite that does.
|
|
147
|
+
- `README.md`'s "Learn more" section said a docs site was "planned for a
|
|
148
|
+
future release" while one already exists in this monorepo (the same app
|
|
149
|
+
`API.md` §6 points to for `/tokens-reference`) — corrected to point at it
|
|
150
|
+
instead of disclaiming it.
|
|
151
|
+
- **Package name unified to `zeus-css`.** The source manifest and all docs
|
|
152
|
+
said `@lazaris/zeus-css` while the published package `scripts/build-package.ts`
|
|
153
|
+
actually generates is — and always was — unscoped `zeus-css`, which is also
|
|
154
|
+
what the `zeus-css init` bridge imports (`@use "zeus-css/scss/zeus.scss"`).
|
|
155
|
+
Following the README's `npm install @lazaris/zeus-css` therefore produced a
|
|
156
|
+
bridge file that could not resolve. `package.json`, `README.md`, and
|
|
157
|
+
`API.md` §1 now all say `zeus-css`.
|
|
158
|
+
- **The four documented entry points now actually resolve.** README/`API.md` §1
|
|
159
|
+
document `zeus-css/foundation`, `zeus-css/zeus`, `zeus-css/config`, and
|
|
160
|
+
`zeus-css/customize`, but the generated package's `exports` map only carried
|
|
161
|
+
`.`, `./config`, and the raw `./scss/*` passthrough — so three of the four
|
|
162
|
+
documented specifiers failed to resolve against the published package.
|
|
163
|
+
Explicit aliases for all four are now emitted.
|
|
164
|
+
- `$zeus-outer-padding` was declared twice in `zeus.config.scss` — an older
|
|
165
|
+
`(mobile, desktop)`-shaped default (used internally to auto-derive
|
|
166
|
+
`$container-bounds`) and a newer `(floor, ceil)`-shaped default (the public
|
|
167
|
+
config that drives `--padding-outer`) reused the same variable name. Because
|
|
168
|
+
the first `!default` assignment wins, the second declaration was always
|
|
169
|
+
dead: `--padding-outer` compiled with a `128px` → `64px` max instead of the
|
|
170
|
+
documented `128px`, and overriding the public var via its documented
|
|
171
|
+
`(floor, ceil)` shape crashed the build (`null` arithmetic) in
|
|
172
|
+
`core/design/core/basic.scss`. The internal default is now its own
|
|
173
|
+
variable, `$zeus-viewport-gutter` (the gutter between the viewport edge and
|
|
174
|
+
the container at each reference width), and both it and `$zeus-viewports`
|
|
175
|
+
(which was never forwarded at all) are now included in the `zeus-css init`
|
|
176
|
+
CLI bridge template.
|
|
177
|
+
- **Six silent-failure gaps in the token pipeline, closed after an internal
|
|
178
|
+
audit.** All were "malformed override compiles anyway, producing broken CSS
|
|
179
|
+
or a confusing low-level error" — none were reachable through the shipped
|
|
180
|
+
defaults, only through a bad override:
|
|
181
|
+
- `_validate.scss`'s validators (written for exactly this) were never
|
|
182
|
+
`@include`d anywhere. Now wired into every token module that assembles a
|
|
183
|
+
`(floor, ceil)`/typography/button-size map — `design/dimensions/spaces.scss`,
|
|
184
|
+
`design/dimensions/sizes.scss`, `design/borders/border-radius.scss`,
|
|
185
|
+
`design/borders/border-line.scss`, `design/layout/grid.scss`
|
|
186
|
+
(`$column-gaps`), `design/typography/typography.scss`, and
|
|
187
|
+
`design/buttons/sizes.scss` — so a malformed entry now fails loudly, by
|
|
188
|
+
name, at the point it's declared.
|
|
189
|
+
- `zeus-resolve-type()` (`views/render/root-generator.scss`) duck-typed the
|
|
190
|
+
token pipeline's dictionary by checking for `floor`+`ceil` or
|
|
191
|
+
`weight`+`lh`; a map with only one of either pair silently fell through to
|
|
192
|
+
"nested map" and emitted a wrong CSS variable instead of the intended one.
|
|
193
|
+
Now `@error`s on a partial match, for any dictionary entry — not just the
|
|
194
|
+
six categories the validators above cover.
|
|
195
|
+
- `zeus-transform-value()`'s typography branch resolved a token's `family`
|
|
196
|
+
key against `$font-family` with no existence check, so a typo'd family
|
|
197
|
+
silently compiled a literal `null` into the emitted `font` shorthand. Now
|
|
198
|
+
`@error`s with the available family names.
|
|
199
|
+
- `btn-size()`'s missing-nested-key case (a size entry with `font`/`py`/`px`
|
|
200
|
+
present but no `floor`/`ceil` inside) is now unreachable — the
|
|
201
|
+
`design/buttons/sizes.scss` validator above rejects the malformed
|
|
202
|
+
`$zeus-button-sizes` entry before `btn-size()` ever sees it.
|
|
203
|
+
- `_c()` (`design/colors/semantic-colors.scss`) intentionally falls back to
|
|
204
|
+
a built-in default when a `$zeus-colors` key is absent — but that made a
|
|
205
|
+
typo'd key (e.g. `primry`) indistinguishable from "not set", with no
|
|
206
|
+
signal at all. `$zeus-colors` is now checked against the exact set of keys
|
|
207
|
+
this file reads; an unrecognized key `@warn`s by name instead of vanishing
|
|
208
|
+
silently.
|
|
209
|
+
- The custom-vars responsive loop (`zeus-root-vars()`) assumed
|
|
210
|
+
`$zeus-breakpoints` was already in ascending pixel order and iterated it
|
|
211
|
+
as-written; an override that appended a new breakpoint out of numeric
|
|
212
|
+
order would cascade it last instead of where its pixel value puts it. The
|
|
213
|
+
loop now sorts breakpoint keys by pixel value before iterating.
|
|
214
|
+
- Duplicate `.inset-0` rule (one hardcoded, one loop-generated) in the new
|
|
215
|
+
position utilities.
|
|
216
|
+
- `_form.scss`'s `&:hover:not(:disabled):not(:focus-visible)` rewritten to
|
|
217
|
+
the `:not(a, b)` complex-selector notation required by the new lint config.
|
|
218
|
+
|
|
219
|
+
## [0.9.0] — 2026-07-20
|
|
220
|
+
|
|
221
|
+
First public beta. Prior versions were internal-only; this changelog starts
|
|
222
|
+
here rather than reconstructing an inaccurate pre-history.
|
|
223
|
+
|
|
224
|
+
### Added
|
|
225
|
+
- `LICENSE` (MIT), `package.json` with a proper `exports` map, and this
|
|
226
|
+
`CHANGELOG.md` — the framework can now be installed via npm.
|
|
227
|
+
- `README.md` with install instructions and a 5-minute quickstart.
|
|
228
|
+
- Opt-in `.no-overflow-x` utility (replaces the old global `overflow-x: hidden`
|
|
229
|
+
on `html`/`body`, which hid real layout overflow instead of surfacing it).
|
|
230
|
+
- `@warn` diagnostic when `$zeus-breakpoint-strategy` is set to an
|
|
231
|
+
unimplemented value (previously silently ignored).
|
|
232
|
+
|
|
233
|
+
### Changed
|
|
234
|
+
- **Single source of truth for color tokens.** Any `*-light`, `*-dark`,
|
|
235
|
+
`surface`, `text-inverse`, `text-muted`, `border`, or `border-strong` key
|
|
236
|
+
defined in `$zeus-colors` is now respected as-is; automatic OKLCH derivation
|
|
237
|
+
only runs for keys the developer did **not** define. Previously, derived
|
|
238
|
+
values silently overwrote explicit config values.
|
|
239
|
+
- Cascade layer order (`reset, tokens, base, layout, components, utilities`)
|
|
240
|
+
is now established before any layer receives rules, and `html`/`body`,
|
|
241
|
+
typography defaults, components (`.z-card`, `.z-modal`), and patterns
|
|
242
|
+
(`.z-hero`, `.z-sidebar-layout`) are now emitted inside their proper layer —
|
|
243
|
+
utility classes can reliably override component styles without `!important`.
|
|
244
|
+
- `zeus.scss` (the module-only entry point used via `@use "zeus" as *` in
|
|
245
|
+
component files) is now truly zero-emission: animation `@keyframes` and the
|
|
246
|
+
scroll-driven `.z-scroll-*` classes moved to the render layer, so importing
|
|
247
|
+
it no longer leaks ~150 lines of duplicate CSS into every component.
|
|
248
|
+
- Config schema unified to `(floor, ceil)` everywhere. `$zeus-column-gaps` and
|
|
249
|
+
`$zeus-outer-padding` previously used `(min, max)` keys that the engine
|
|
250
|
+
silently ignored — overrides now apply correctly.
|
|
251
|
+
- Grid utilities (`.grid-cols-*`, `.grid-split`, `.grid-thirds`,
|
|
252
|
+
`.grid-sidebar`, `.z-sidebar-layout`) use `minmax(0, 1fr)` instead of bare
|
|
253
|
+
`1fr`, preventing grid blowout (a page-level horizontal scrollbar) when a
|
|
254
|
+
grid child contains wide unbreakable content such as code blocks.
|
|
255
|
+
- `$zeus-use-prefix` now applies consistently across every utility generator
|
|
256
|
+
(shadows, containers, compounds, aspect-ratio, animations, grid patterns) —
|
|
257
|
+
previously only some class families respected it.
|
|
258
|
+
- `color()` alpha blending now uses `color.change()` instead of `rgba()`,
|
|
259
|
+
which crashed on OKLCH input in modern Dart Sass.
|
|
260
|
+
|
|
261
|
+
### Fixed
|
|
262
|
+
- `<dialog class="z-modal">` no longer renders visible when closed (the base
|
|
263
|
+
rule set `display` unconditionally; it's now scoped to `&[open]`).
|
|
264
|
+
- `:where(li) { list-style: none }` and the accompanying `padding-left: 0`
|
|
265
|
+
reset — both applied globally — have been removed; only lists explicitly
|
|
266
|
+
marked `[role="list"]` opt out of native bullets, preserving list semantics
|
|
267
|
+
for assistive technology.
|
|
268
|
+
- `outline: none` on shadow-based focus styles now only applies under
|
|
269
|
+
`:focus-visible`, never plain `:focus`, so keyboard users always retain a
|
|
270
|
+
visible focus indicator.
|
|
271
|
+
- `html { font-size: 16px }` → `font-size: 100%`, respecting the user's
|
|
272
|
+
browser font-size preference instead of overriding it.
|
|
273
|
+
- `scroll-behavior: smooth` no longer applied unconditionally outside the
|
|
274
|
+
`prefers-reduced-motion` guard already present in the reset.
|
|
275
|
+
- `--color-surface-subtle` and `--color-warning-subtle` (referenced by
|
|
276
|
+
`:where(code)` / `:where(mark)`) are now actually defined.
|
|
277
|
+
- An impossible/dead media query combination
|
|
278
|
+
(`min-width: 2560px` together with an inner `max-width` below it) that could
|
|
279
|
+
never match has been removed from the responsive utility loop.
|
|
280
|
+
- Stale `(min, max)` references in comments and validator error messages
|
|
281
|
+
corrected to the actual `(floor, ceil)` schema.
|
package/scss/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
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
|
+
## Two entry points
|
|
50
|
+
|
|
51
|
+
Zeus ships two distinct ways to consume it — pick the right one per file.
|
|
52
|
+
|
|
53
|
+
### 1. Global stylesheet — `foundation`
|
|
54
|
+
|
|
55
|
+
Import **once**, at your app root. Emits the full compiled CSS: reset, design
|
|
56
|
+
tokens as CSS custom properties, typography base, and every utility class
|
|
57
|
+
(`.padding-lg`, `.text-h1`, `.grid-cols-3`, …).
|
|
58
|
+
|
|
59
|
+
```scss
|
|
60
|
+
// app/globals.scss
|
|
61
|
+
@use "zeus-css/foundation";
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 2. Component modules — `zeus`
|
|
65
|
+
|
|
66
|
+
Import in **every** `.module.scss` component file. Exposes all mixins and
|
|
67
|
+
functions (`@include padding(...)`, `@include text(...)`, `color(...)`, …) but
|
|
68
|
+
emits **zero** CSS of its own — only the rules you actually write.
|
|
69
|
+
|
|
70
|
+
```scss
|
|
71
|
+
// Button.module.scss
|
|
72
|
+
@use "zeus-css/zeus" as *;
|
|
73
|
+
|
|
74
|
+
.button {
|
|
75
|
+
@include padding("md", "x");
|
|
76
|
+
@include text("button");
|
|
77
|
+
@include border-radius("sm");
|
|
78
|
+
background: color("primary");
|
|
79
|
+
color: var(--color-text-inverse);
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
background: color("primary-dark");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 5-minute quickstart
|
|
88
|
+
|
|
89
|
+
```scss
|
|
90
|
+
// 1. app/globals.scss — load the framework once
|
|
91
|
+
@use "zeus-css/foundation";
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
// 2. app/layout.tsx — import the global stylesheet
|
|
96
|
+
import "./globals.scss";
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```scss
|
|
100
|
+
// 3. components/Card.module.scss — build a component with the API
|
|
101
|
+
@use "zeus-css/zeus" as *;
|
|
102
|
+
|
|
103
|
+
.card {
|
|
104
|
+
@include padding("lg");
|
|
105
|
+
@include border-radius("md");
|
|
106
|
+
@include card-shadow();
|
|
107
|
+
background: var(--color-surface);
|
|
108
|
+
border: var(--border-line-xs) solid var(--color-border);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.title {
|
|
112
|
+
@include text("h4");
|
|
113
|
+
color: var(--color-text);
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
```tsx
|
|
118
|
+
// components/Card.tsx
|
|
119
|
+
import styles from "./Card.module.scss";
|
|
120
|
+
|
|
121
|
+
export function Card({ children }: { children: React.ReactNode }) {
|
|
122
|
+
return <div className={styles.card}>{children}</div>;
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
That's it — no build config, no PostCSS plugin. Zeus compiles with any
|
|
127
|
+
standard Dart Sass pipeline (Next.js, Vite, webpack `sass-loader`, or the
|
|
128
|
+
`sass` CLI directly).
|
|
129
|
+
|
|
130
|
+
## Theming your brand
|
|
131
|
+
|
|
132
|
+
Every visual token — colors, typography, spacing, radii, shadows, breakpoints
|
|
133
|
+
— lives in **one file**: `zeus.customize.scss`. Copy the keys you want to
|
|
134
|
+
override from `zeus.token.sets.example.scss` (a reference-only file, never
|
|
135
|
+
imported) into your own `zeus.customize.scss` before the `@use` chain resolves.
|
|
136
|
+
|
|
137
|
+
```scss
|
|
138
|
+
// zeus.customize.scss
|
|
139
|
+
$zeus-colors: (
|
|
140
|
+
"primary": oklch(60% 0.2 250),
|
|
141
|
+
"primary-light": oklch(75% 0.15 250),
|
|
142
|
+
"primary-dark": oklch(45% 0.25 250),
|
|
143
|
+
// ...
|
|
144
|
+
);
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Layout/engine behavior (prefixing, responsive strategy, fluid viewport bounds)
|
|
148
|
+
lives in `zeus.config.scss` — separate from design tokens on purpose, so
|
|
149
|
+
brand changes and structural changes never collide in the same diff.
|
|
150
|
+
|
|
151
|
+
## Learn more
|
|
152
|
+
|
|
153
|
+
- `zeus.token.sets.example.scss` — full reference of every default token value.
|
|
154
|
+
- `CHANGELOG.md` — what changed between versions.
|
|
155
|
+
- The framework's docs site (component gallery, `/tokens-reference`, full API
|
|
156
|
+
reference) already exists in this monorepo — see `API.md` §6.
|
|
157
|
+
|
|
158
|
+
## License
|
|
159
|
+
|
|
160
|
+
MIT © Stavros Kosmas Lazaris
|