@fest-lib/veela 0.1.18 → 0.1.19
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 +93 -504
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,545 +1,134 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<strong>@fest-lib/veela</strong><br>
|
|
3
|
+
Design tokens, <code>--c2-*</code> color functions, Agate.UX. Values live in SCSS — this file is the map.
|
|
4
|
+
</p>
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://www.npmjs.com/package/@fest-lib/veela"><img src="https://img.shields.io/npm/v/@fest-lib/veela?style=flat-square" alt="npm"></a>
|
|
8
|
+
<a href="LICENSE"><img src="https://img.shields.io/npm/l/@fest-lib/veela?style=flat-square" alt="MIT"></a>
|
|
9
|
+
<a href="https://github.com/fest-live/veela.css"><img src="https://img.shields.io/github/stars/fest-live/veela.css?style=flat-square" alt="stars"></a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
Do not emit a second `:root` palette in apps. Consume tokens and override context (`var(--token, fallback)`). Token SoT: `src/scss` (`core/misc/_tokens.scss`).
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
core · dom · object · lure
|
|
16
|
+
└── fest/veela ← you are here
|
|
17
|
+
└── fl-ui · shells · apps
|
|
18
|
+
```
|
|
2
19
|
|
|
3
|
-
|
|
20
|
+
## Install
|
|
4
21
|
|
|
5
22
|
```bash
|
|
6
|
-
npm install @fest-lib/veela
|
|
23
|
+
npm install @fest-lib/core @fest-lib/dom @fest-lib/object @fest-lib/lure @fest-lib/veela
|
|
7
24
|
```
|
|
8
25
|
|
|
9
|
-
|
|
10
|
-
import { /* runtime loaders */ } from "@fest-lib/veela";
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
SCSS: `@fest-lib/veela/scss/*`. Peers: `@fest-lib/core`, `dom`, `object`, `lure`.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Implementation Details
|
|
18
|
-
|
|
19
|
-
- **Transforms:** `self-size-x`/`self-size-y` = `100%` (client-space)
|
|
20
|
-
- **Insets/Sizing:** `self-size-x`/`self-size-y` = offset parent size
|
|
21
|
-
- **Transforms:** default to client-space unless transformed
|
|
22
|
-
- **Inline/Block:** sizes/insets may swap in different writing modes
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 🏗️ Potential Implementations
|
|
27
|
-
|
|
28
|
-
- **By layout:**
|
|
29
|
-
- Fixed/absolute (insets)
|
|
30
|
-
- CSS Houdini (layout worklets)
|
|
31
|
-
- **By orientation:**
|
|
32
|
-
- `inline`/`block` with `writing-mode`/`direction`
|
|
33
|
-
- `transform`-based (`rotate`)
|
|
34
|
-
- Mixed/combined approaches
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## 🎨 Custom CSS Properties
|
|
39
|
-
|
|
40
|
-
| Oriented-Space | Client-Space | Implementation-Dependent |
|
|
41
|
-
|:--------------:|:------------:|:------------------------:|
|
|
42
|
-
| `--os-inset-x` | `--cs-inset-x` | `--im-inset-x` |
|
|
43
|
-
| `--os-inset-y` | `--cs-inset-y` | `--im-inset-y` |
|
|
44
|
-
| `--os-drag-x` | `--cs-drag-x` | `--im-drag-x` |
|
|
45
|
-
| `--os-drag-y` | `--cs-drag-y` | `--im-drag-y` |
|
|
46
|
-
| `--os-size-x` | `--cs-size-x` | `--im-size-x` |
|
|
47
|
-
| `--os-size-y` | `--cs-size-y` | `--im-size-y` |
|
|
48
|
-
| `--os-self-size-x` | `--cs-self-size-x` | `--im-self-size-x` |
|
|
49
|
-
| `--os-self-size-y` | `--cs-self-size-y` | `--im-self-size-y` |
|
|
50
|
-
| `--os-offset-x` | `--cs-offset-x` | `--im-offset-x` |
|
|
51
|
-
| `--os-offset-y` | `--cs-offset-y` | `--im-offset-y` |
|
|
52
|
-
|
|
53
|
-
## 📏 Scaling
|
|
54
|
-
|
|
55
|
-
Special versions of `getBoundingClientRect`, `clientX`, and `clientY` with virtual scaling support.
|
|
56
|
-
|
|
57
|
-
**Scaling methods:**
|
|
58
|
-
- CSS `zoom` (recommended)
|
|
59
|
-
- CSS `scale` (legacy)
|
|
60
|
-
- `rem`/`em` units
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## 🏙️ Agate.UX — Multi-dimensional UX/Interaction
|
|
66
|
-
|
|
67
|
-
> **Agate.UX** is a next-gen sub-component for advanced UI/UX, designed for the "2REmembrance" generation (2025+).
|
|
68
|
-
|
|
69
|
-
### 🧩 Key Concepts
|
|
70
|
-
|
|
71
|
-
- **Orientation-based transforms:**
|
|
72
|
-
`calc(var(--orient, 0) * <A>)` where `<A>` can be `100grad`, `0.25turn`, `90deg`, etc.
|
|
73
|
-
- **Self-centering elements:**
|
|
74
|
-
`translate(-50%, -50%)` with `transform-origin: 0px 0px;`
|
|
75
|
-
- **Drag & center combined:**
|
|
76
|
-
`translate(calc(var(--drag-x, 0px) - 50%), calc(var(--drag-y, 0px) - 50%))`
|
|
77
|
-
|
|
78
|
-
<details>
|
|
79
|
-
<summary>How it works?</summary>
|
|
80
|
-
|
|
81
|
-
#### Coordinate Spaces
|
|
82
|
-
|
|
83
|
-
- <kbd>Client-Space</kbd>: page coordinate system
|
|
84
|
-
- <kbd>Oriented-Space</kbd>: virtual screen
|
|
85
|
-
- <kbd>Algorithm-Space</kbd>: internal logic
|
|
86
|
-
|
|
87
|
-
#### Degree Types
|
|
88
|
-
|
|
89
|
-
- <span style="background:#eee; border-radius:4px; padding:2px 6px;">90deg-based</span> (0°, 90°, 180°, 270°)
|
|
90
|
-
- <span style="background:#eee; border-radius:4px; padding:2px 6px;">Variable/Matrix-based</span>
|
|
91
|
-
|
|
92
|
-
#### Event Pre-computation
|
|
93
|
-
|
|
94
|
-
- Client-Space Pointer Position
|
|
95
|
-
- Oriented-Space Pointer Position
|
|
96
|
-
- Algorithm-Space Pointer Position
|
|
97
|
-
|
|
98
|
-
</details>
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## 🧭 Policy Concepts
|
|
103
|
-
|
|
104
|
-
- Use `inset` for semi-static, `translate` for dynamic (drag/animation) positioning.
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## 1. Introduction
|
|
109
|
-
|
|
110
|
-
Veela.CSS is a CSS framework for building modern, responsive, and accessible web applications. It is built on top of the veela.js library and provides a set of reusable components and utilities for building web applications.
|
|
26
|
+
Peers: `core`, `dom`, `object`, `lure` (`>=0.1.0`). The published tarball includes `dist/` **and** `src/scss/`.
|
|
111
27
|
|
|
112
|
-
|
|
28
|
+
### Runtime (adopted / inline)
|
|
113
29
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- Built-in animations
|
|
119
|
-
|
|
120
|
-
## 3. Architecture
|
|
121
|
-
|
|
122
|
-
### Runtime side
|
|
123
|
-
|
|
124
|
-
- Color functions
|
|
125
|
-
- Atomic classes
|
|
126
|
-
- Animation keyframes
|
|
127
|
-
- Implementations (commons)
|
|
128
|
-
|
|
129
|
-
### SCSS library
|
|
130
|
-
|
|
131
|
-
- Theme mixins
|
|
132
|
-
- Layout mixins
|
|
133
|
-
- Utility mixins
|
|
134
|
-
|
|
135
|
-
### Design types
|
|
136
|
-
|
|
137
|
-
- VE design (default, but no priority)
|
|
138
|
-
- Material Design 3 (not completed yet)
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Color functions
|
|
143
|
-
|
|
144
|
-
Currently we used native CSS custom functions (and own implementations for veela.css runtime side).
|
|
145
|
-
|
|
146
|
-
- `--c2-surface(tone = 0, base-color = var(--current), scheme-id = 2)` - returns a surface color based on the tone, base color and theme id
|
|
147
|
-
- `--c2-on-surface(tone = 0, base-color = var(--current), scheme-id = 2)` - returns a on-surface color based on the tone, base color and theme id
|
|
148
|
-
- `--c2-contrast(tone = 0, base-color = var(--current), scheme-id = 2)` - returns a contrast color based on the tone, base color and theme id
|
|
149
|
-
- `--c2-on-contrast(tone = 0, base-color = var(--current), scheme-id = 2)` - returns a on-contrast color based on the tone, base color and theme id
|
|
150
|
-
|
|
151
|
-
### Alpha channel
|
|
152
|
-
|
|
153
|
-
- Can be got by relative color function, e.g. `oklch(from --c2-surface(tone = 0, base-color = var(--current), scheme-id = 2) l c h/ 0.5)`
|
|
154
|
-
|
|
155
|
-
### Scheme ID
|
|
156
|
-
|
|
157
|
-
- 0 - light
|
|
158
|
-
- 1 - dark
|
|
159
|
-
- 2 - default
|
|
30
|
+
```ts
|
|
31
|
+
import initialize from "@fest-lib/veela";
|
|
32
|
+
initialize(); // loads bundled SCSS via @fest-lib/dom
|
|
33
|
+
```
|
|
160
34
|
|
|
161
|
-
|
|
35
|
+
Variants (from `src/scss/index.ts`):
|
|
162
36
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
37
|
+
```ts
|
|
38
|
+
import { loadVeelaVariant } from "@fest-lib/veela/scss/index.ts";
|
|
39
|
+
// "core" | "basic" | "advanced" | "beercss"
|
|
40
|
+
await loadVeelaVariant("advanced");
|
|
41
|
+
```
|
|
166
42
|
|
|
167
|
-
|
|
43
|
+
In the workspace, FL.UI usually loads Veela for you (`configureFlUI({ styleVariant: "veela-advanced" })`).
|
|
168
44
|
|
|
169
|
-
|
|
170
|
-
- `var(--primary)` - the primary color (in MD3 adapted under --current)
|
|
171
|
-
- `var(--secondary)` - the secondary color (in MD3 adapted under --secondary)
|
|
172
|
-
- `var(--accent)` - the accent color (in MD3 adapted under --accent)
|
|
173
|
-
- `var(--success)` - the success color
|
|
174
|
-
- `var(--warning)` - the warning color
|
|
175
|
-
- `var(--error)` - the error color
|
|
45
|
+
### SCSS
|
|
176
46
|
|
|
177
|
-
|
|
47
|
+
```scss
|
|
48
|
+
@use "@fest-lib/veela/scss/core" as *;
|
|
178
49
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
50
|
+
.card {
|
|
51
|
+
background: var(--c2-surface, var(--color-surface));
|
|
52
|
+
padding: var(--space-md);
|
|
53
|
+
border-radius: var(--radius-md);
|
|
182
54
|
}
|
|
183
55
|
```
|
|
184
56
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
- `@mixin solid-colorize(selector = "&", options: ("shade": 0.0, "tint": 0.0, "scheme-id": 2, "role": null))` - colorizes the selector with the given options
|
|
188
|
-
|
|
189
|
-
### Options
|
|
57
|
+
Exports: `@fest-lib/veela/scss/*` → `src/scss/*`.
|
|
190
58
|
|
|
191
|
-
|
|
192
|
-
- `tint` - the tint of the color, default is 0.0
|
|
193
|
-
- `scheme-id` - the scheme id, default is 2
|
|
194
|
-
- 0 - light
|
|
195
|
-
- 1 - dark
|
|
196
|
-
- 2 - default
|
|
197
|
-
- `role` - the role of the color, default is null
|
|
198
|
-
- MD3 specific, such as `primary`, `secondary`, `tertiary`, `error`, `surface`, `on-surface`, etc.
|
|
199
|
-
- null - no role, default to current color
|
|
200
|
-
- `scope` - propagation mode, default is `"component"`
|
|
201
|
-
- `"component"` - applies the palette to the selector, supporting descendant form controls and global helpers (previous `solid-colorize` behaviour)
|
|
202
|
-
- `"selector"` - limits the palette to the selector itself without propagating to descendants (previous `solid-colorize-selector-only` behaviour)
|
|
203
|
-
- `propagate` - optional boolean override for descendant propagation (defaults to the value implied by `scope`)
|
|
204
|
-
- `forms-background` - controls whether interactive descendants receive the blended background colour (defaults to the value of `propagate`)
|
|
205
|
-
- `global-targets` - toggles the additional global helpers (`::picker`, `ui-icon`, inline text tags) (defaults to the value of `propagate`)
|
|
59
|
+
## Color functions
|
|
206
60
|
|
|
207
|
-
|
|
61
|
+
Native CSS custom functions (plus runtime fallbacks):
|
|
208
62
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
63
|
+
| Function | Role |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| `--c2-surface(tone, base-color, scheme-id)` | surface |
|
|
66
|
+
| `--c2-on-surface(...)` | ink on surface |
|
|
67
|
+
| `--c2-contrast(...)` | contrast fill |
|
|
68
|
+
| `--c2-on-contrast(...)` | ink on contrast |
|
|
214
69
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
**Padding variables (in rem):**
|
|
220
|
-
|
|
221
|
-
- `--padding-sm` - 0.25rem
|
|
222
|
-
- `--padding-md` - 0.5rem
|
|
223
|
-
- `--padding-lg` - 1rem
|
|
224
|
-
- `--padding-xl` - 2rem
|
|
225
|
-
- `--padding-2xl` - 4rem
|
|
226
|
-
- `--padding-3xl` - 8rem
|
|
227
|
-
- `--padding-4xl` - 16rem
|
|
228
|
-
- `--padding-5xl` - 32rem
|
|
229
|
-
- `--padding-6xl` - 64rem
|
|
230
|
-
- `--padding-7xl` - 128rem
|
|
231
|
-
- `--padding-8xl` - 256rem
|
|
232
|
-
- `--padding-9xl` - 512rem
|
|
233
|
-
|
|
234
|
-
**Spacing variables (in rem):**
|
|
235
|
-
|
|
236
|
-
- `--space-xs` - 0.25rem
|
|
237
|
-
- `--space-sm` - 0.5rem
|
|
238
|
-
- `--space-md` - 0.75rem
|
|
239
|
-
- `--space-lg` - 1rem
|
|
240
|
-
- `--space-xl` - 1.25rem
|
|
241
|
-
- `--space-2xl` - 1.6rem
|
|
242
|
-
|
|
243
|
-
**Radius variables (in rem):**
|
|
244
|
-
|
|
245
|
-
- `--radius-xs` - 0.25rem
|
|
246
|
-
- `--radius-sm` - 0.5rem
|
|
247
|
-
- `--radius-md` - 0.75rem
|
|
248
|
-
- `--radius-lg` - 0.85rem
|
|
249
|
-
- `--radius-xl` - 1rem
|
|
250
|
-
- `--radius-2xl` - 1.25rem
|
|
251
|
-
- `--radius-full` - min(50dvmin, 50cqmin)
|
|
252
|
-
|
|
253
|
-
**Gap variables (in rem):**
|
|
254
|
-
|
|
255
|
-
- `--gap-xs` - 0.25rem
|
|
256
|
-
- `--gap-sm` - 0.5rem
|
|
257
|
-
- `--gap-md` - 0.75rem
|
|
258
|
-
- `--gap-lg` - 1rem
|
|
259
|
-
- `--gap-xl` - 1.25rem
|
|
260
|
-
- `--gap-2xl` - 1.6rem
|
|
261
|
-
|
|
262
|
-
**Font size variables (in rem):**
|
|
263
|
-
|
|
264
|
-
- `--text-xs` - 0.7rem
|
|
265
|
-
- `--text-sm` - 0.8rem
|
|
266
|
-
- `--text-base` - 0.9rem
|
|
267
|
-
- `--text-lg` - 1rem
|
|
268
|
-
- `--text-xl` - 1.25rem
|
|
269
|
-
- `--text-2xl` - 1.6rem
|
|
270
|
-
- `--text-3xl` - 2rem
|
|
271
|
-
- `--text-4xl` - 2.5rem
|
|
272
|
-
- `--text-5xl` - 3rem
|
|
273
|
-
- `--text-6xl` - 4rem
|
|
274
|
-
|
|
275
|
-
**Line height variables:**
|
|
276
|
-
|
|
277
|
-
- `--leading-tight` - 1.2
|
|
278
|
-
- `--leading-normal` - 1.5
|
|
279
|
-
- `--leading-relaxed` - 1.8
|
|
280
|
-
|
|
281
|
-
**Font weight variables:**
|
|
282
|
-
|
|
283
|
-
- `--font-weight-normal` - 400
|
|
284
|
-
- `--font-weight-medium` - 500
|
|
285
|
-
- `--font-weight-semibold` - 600
|
|
286
|
-
- `--font-weight-bold` - 700
|
|
287
|
-
|
|
288
|
-
**Font family variables:**
|
|
289
|
-
|
|
290
|
-
- `--font-family` - 'Roboto', sans-serif
|
|
291
|
-
- `--font-family-mono` - 'Roboto Mono', monospace
|
|
292
|
-
- `--font-family-display` - 'Roboto Display', sans-serif
|
|
293
|
-
- `--font-family-serif` - 'Roboto Serif', serif
|
|
294
|
-
- `--font-family-handwriting` - 'Roboto Handwriting', cursive
|
|
295
|
-
- `--font-family-fantasy` - 'Roboto Fantasy', fantasy
|
|
296
|
-
- `--font-family-cursive` - 'Roboto Cursive', cursive
|
|
297
|
-
- `--font-family-system` - system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
|
|
298
|
-
|
|
299
|
-
**Transition variables:**
|
|
300
|
-
|
|
301
|
-
- `--transition-fast` - 140ms ease
|
|
302
|
-
- `--transition-normal` - 160ms ease
|
|
303
|
-
- `--transition-slow` - 200ms ease
|
|
304
|
-
|
|
305
|
-
**Interactive state variables:**
|
|
306
|
-
|
|
307
|
-
- `--hover-lift` - 0.03
|
|
308
|
-
- `--active-lift` - 0.05
|
|
309
|
-
- `--focus-lift` - 0.02
|
|
310
|
-
|
|
311
|
-
**Shadow variables:**
|
|
312
|
-
|
|
313
|
-
- `--shadow-sm` - 0 1px 2px rgba(0, 0, 0, 0.05)
|
|
314
|
-
- `--shadow-md` - 0 4px 6px rgba(0, 0, 0, 0.1)
|
|
315
|
-
- `--shadow-lg` - 0 10px 15px rgba(0, 0, 0, 0.1)
|
|
316
|
-
- `--shadow-xl` - 0 20px 25px rgba(0, 0, 0, 0.1)
|
|
317
|
-
- `--shadow-2xl` - 0 25px 50px rgba(0, 0, 0, 0.1)
|
|
318
|
-
- `--shadow-inset` - inset 0 1px 0 rgba(0, 0, 0, 0.05)
|
|
319
|
-
- `--shadow-inset-strong` - inset 0 2px 6px rgba(0, 0, 0, 0.1)
|
|
320
|
-
|
|
321
|
-
**Border width variables (in px):**
|
|
322
|
-
|
|
323
|
-
- `--border-width-sm` - 0.5px
|
|
324
|
-
- `--border-width-md` - 1px
|
|
325
|
-
- `--border-width-lg` - 2px
|
|
326
|
-
- `--border-width-xl` - 4px
|
|
327
|
-
- `--border-width-2xl` - 8px
|
|
328
|
-
- `--border-width-3xl` - 16px
|
|
329
|
-
- `--border-width-4xl` - 32px
|
|
330
|
-
- `--border-width-5xl` - 64px
|
|
331
|
-
- `--border-width-6xl` - 128px
|
|
332
|
-
- `--border-width-7xl` - 256px
|
|
333
|
-
- `--border-width-8xl` - 512px
|
|
334
|
-
- `--border-width-9xl` - 1024px
|
|
335
|
-
|
|
336
|
-
## Avatar and icon sizes
|
|
337
|
-
|
|
338
|
-
- `--avatar-size` - 48px
|
|
339
|
-
- `--avatar-size-lg` - 64px
|
|
340
|
-
- `--icon-size-sm` - 1rem
|
|
341
|
-
- `--icon-size-md` - 1.25rem
|
|
342
|
-
- `--icon-size-lg` - 1.5rem
|
|
343
|
-
|
|
344
|
-
### Example
|
|
70
|
+
- **scheme-id:** `0` light · `1` dark · `2` default (follow host).
|
|
71
|
+
- **tone:** `0` black/white end · `50%` chroma · `100%` opposite end.
|
|
72
|
+
- **base-color:** `var(--current)` (default), `--primary`, `--secondary`, `--accent`, `--success`, `--warning`, `--error`.
|
|
345
73
|
|
|
346
74
|
```css
|
|
347
|
-
.
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
351
|
-
.icon-size-md {
|
|
352
|
-
inline-size: var(--icon-size-md);
|
|
353
|
-
block-size: var(--icon-size-md);
|
|
354
|
-
}
|
|
355
|
-
.icon-size-lg {
|
|
356
|
-
inline-size: var(--icon-size-lg);
|
|
357
|
-
block-size: var(--icon-size-lg);
|
|
75
|
+
.panel {
|
|
76
|
+
background: var(--c2-surface);
|
|
77
|
+
color: var(--c2-on-surface);
|
|
358
78
|
}
|
|
359
79
|
```
|
|
360
80
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
## Atomic classes
|
|
364
|
-
|
|
365
|
-
### Padding
|
|
81
|
+
Alpha via relative color: `oklch(from var(--c2-surface) l c h / 0.5)`.
|
|
366
82
|
|
|
367
|
-
|
|
368
|
-
- `.p-sm` - padding: `var(--padding-sm)`
|
|
369
|
-
- `.p-md` - padding: `var(--padding-md)`
|
|
370
|
-
- `.p-lg` - padding: `var(--padding-lg)`
|
|
371
|
-
- `.p-xl` - padding: `var(--padding-xl)`
|
|
372
|
-
- `.p-2xl` - padding: `var(--padding-2xl)`
|
|
373
|
-
- `.p-3xl` - padding: `var(--padding-3xl)`
|
|
374
|
-
- `.p-4xl` - padding: `var(--padding-4xl)`
|
|
375
|
-
- `.p-5xl` - padding: `var(--padding-5xl)`
|
|
376
|
-
- `.p-6xl` - padding: `var(--padding-6xl)`
|
|
377
|
-
- `.p-7xl` - padding: `var(--padding-7xl)`
|
|
378
|
-
- `.p-8xl` - padding: `var(--padding-8xl)`
|
|
379
|
-
- `.p-9xl` - padding: `var(--padding-9xl)`
|
|
380
|
-
|
|
381
|
-
### Margin
|
|
382
|
-
|
|
383
|
-
- `.m-xs` - margin: `var(--space-xs)`
|
|
384
|
-
- `.m-sm` - margin: `var(--space-sm)`
|
|
385
|
-
- `.m-md` - margin: `var(--space-md)`
|
|
386
|
-
- `.m-lg` - margin: `var(--space-lg)`
|
|
387
|
-
- `.m-xl` - margin: `var(--space-xl)`
|
|
388
|
-
- `.m-2xl` - margin: `var(--space-2xl)`
|
|
389
|
-
- `.m-3xl` - margin: `var(--space-3xl)`
|
|
390
|
-
- `.m-4xl` - margin: `var(--space-4xl)`
|
|
391
|
-
- `.m-5xl` - margin: `var(--space-5xl)`
|
|
392
|
-
- `.m-6xl` - margin: `var(--space-6xl)`
|
|
393
|
-
|
|
394
|
-
### Gap
|
|
395
|
-
|
|
396
|
-
- `.gap-xs` - gap: `var(--gap-xs)`
|
|
397
|
-
- `.gap-sm` - gap: `var(--gap-sm)`
|
|
398
|
-
- `.gap-md` - gap: `var(--gap-md)`
|
|
399
|
-
- `.gap-lg` - gap: `var(--gap-lg)`
|
|
400
|
-
- `.gap-xl` - gap: `var(--gap-xl)`
|
|
401
|
-
|
|
402
|
-
### Text size
|
|
403
|
-
|
|
404
|
-
- `.text-xs` - font-size: `var(--text-xs)`
|
|
405
|
-
- `.text-sm` - font-size: `var(--text-sm)`
|
|
406
|
-
- `.text-base` - font-size: `var(--text-base)`
|
|
407
|
-
- `.text-lg` - font-size: `var(--text-lg)`
|
|
408
|
-
- `.text-xl` - font-size: `var(--text-xl)`
|
|
409
|
-
|
|
410
|
-
### Font weight
|
|
411
|
-
|
|
412
|
-
- `.font-weight-normal` - font-weight: `var(--font-weight-normal)`
|
|
413
|
-
- `.font-weight-medium` - font-weight: `var(--font-weight-medium)`
|
|
414
|
-
- `.font-weight-semibold` - font-weight: `var(--font-weight-semibold)`
|
|
415
|
-
- `.font-weight-bold` - font-weight: `var(--font-weight-bold)`
|
|
416
|
-
|
|
417
|
-
### Font family
|
|
418
|
-
|
|
419
|
-
- `.font-family-sans-serif` - font-family: `var(--font-family-sans-serif)`
|
|
420
|
-
- `.font-family-serif` - font-family: `var(--font-family-serif)`
|
|
421
|
-
- `.font-family-monospace` - font-family: `var(--font-family-monospace)`
|
|
422
|
-
- `.font-family-display` - font-family: `var(--font-family-display)`
|
|
423
|
-
- `.font-family-handwriting` - font-family: `var(--font-family-handwriting)`
|
|
424
|
-
|
|
425
|
-
### Line height
|
|
426
|
-
|
|
427
|
-
- `.leading-tight` - line-height: `var(--leading-tight)`
|
|
428
|
-
- `.leading-normal` - line-height: `var(--leading-normal)`
|
|
429
|
-
- `.leading-relaxed` - line-height: `var(--leading-relaxed)`
|
|
430
|
-
|
|
431
|
-
### Transition
|
|
432
|
-
|
|
433
|
-
- `.transition-fast` - transition: `var(--transition-fast)`
|
|
434
|
-
- `.transition-normal` - transition: `var(--transition-normal)`
|
|
435
|
-
- `.transition-slow` - transition: `var(--transition-slow)`
|
|
436
|
-
|
|
437
|
-
### Interactive state
|
|
438
|
-
|
|
439
|
-
- `.hover-lift` - transform: `translateY(var(--hover-lift))`
|
|
440
|
-
- `.active-lift` - transform: `translateY(var(--active-lift))`
|
|
441
|
-
- `.focus-lift` - transform: `translateY(var(--focus-lift))`
|
|
442
|
-
|
|
443
|
-
### Display
|
|
444
|
-
|
|
445
|
-
- `.d-grid` - display: `grid`
|
|
446
|
-
- `.d-flex` - display: `flex`
|
|
447
|
-
- `.d-block` - display: `block`
|
|
448
|
-
- `.d-inline` - display: `inline`
|
|
449
|
-
- `.d-inline-block` - display: `inline-block`
|
|
450
|
-
- `.d-inline-flex` - display: `inline-flex`
|
|
451
|
-
- `.d-inline-grid` - display: `inline-grid`
|
|
452
|
-
- `.d-none` - display: `none`
|
|
453
|
-
- `.d-flex-col` - display: `flex-column`
|
|
454
|
-
- `.d-flex-row` - display: `flex-row`
|
|
455
|
-
- `.d-flex-col-reverse` - display: `flex-column-reverse`
|
|
456
|
-
- `.d-flex-row-reverse` - display: `flex-row-reverse`
|
|
457
|
-
- `.d-flex-wrap` - display: `flex-wrap`
|
|
458
|
-
- `.d-flex-wrap-reverse` - display: `flex-wrap-reverse`
|
|
459
|
-
|
|
460
|
-
### Shadow
|
|
461
|
-
|
|
462
|
-
- `.shadow-sm` - box-shadow: `var(--shadow-sm)`
|
|
463
|
-
|
|
464
|
-
### Examples of classes usage
|
|
465
|
-
|
|
466
|
-
Grid with padding, margin, gap and `display: grid;`
|
|
467
|
-
```html
|
|
468
|
-
<div class="p-md m-md gap-md d-grid">
|
|
469
|
-
<div class="p-md m-md gap-md d-grid">
|
|
470
|
-
<div class="p-md m-md gap-md d-grid">
|
|
471
|
-
</div>
|
|
472
|
-
<div class="p-md m-md gap-md d-grid">
|
|
473
|
-
</div>
|
|
474
|
-
</div>
|
|
475
|
-
</div>
|
|
476
|
-
```
|
|
83
|
+
### `solid-colorize` mixin
|
|
477
84
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
</div>
|
|
85
|
+
```scss
|
|
86
|
+
@include solid-colorize("&", (
|
|
87
|
+
"shade": 0,
|
|
88
|
+
"tint": 0,
|
|
89
|
+
"scheme-id": 2,
|
|
90
|
+
"role": null,
|
|
91
|
+
"scope": "component" // or "selector"
|
|
92
|
+
));
|
|
487
93
|
```
|
|
488
94
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
## MD3 color classes and variants
|
|
95
|
+
`scope: "component"` paints descendants / form helpers; `"selector"` stays on the node.
|
|
492
96
|
|
|
493
|
-
|
|
97
|
+
## Tokens (excerpt)
|
|
494
98
|
|
|
495
|
-
|
|
496
|
-
- `.color-secondary` - color: `var(--color-secondary)`
|
|
497
|
-
- `.color-accent` - color: `var(--color-accent)`
|
|
498
|
-
- `.color-success` - color: `var(--color-success);`
|
|
499
|
-
- `.color-warning` - color: `var(--color-warning);`
|
|
500
|
-
- `.color-danger` - color: `var(--color-danger);`
|
|
501
|
-
- `.color-info` - color: `var(--color-info);`
|
|
99
|
+
Live numbers are in SCSS. Typical names:
|
|
502
100
|
|
|
503
|
-
|
|
101
|
+
| Kind | Examples |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| Space | `--space-xs` … `--space-2xl`, `--gap-*`, `--padding-*` |
|
|
104
|
+
| Radius | `--radius-xs` … `--radius-2xl`, `--radius-full` |
|
|
105
|
+
| Type | `--text-xs` … `--text-6xl`, `--leading-*`, `--font-weight-*` |
|
|
106
|
+
| Motion | `--transition-fast` / `normal` / `slow` |
|
|
107
|
+
| Shadow | `--shadow-sm` … `--shadow-2xl`, `--shadow-inset` |
|
|
108
|
+
| Chrome | `--icon-size-*`, `--avatar-size`, `--border-width-*` |
|
|
504
109
|
|
|
505
|
-
- `.
|
|
506
|
-
- `.surface-subtle` - background-color: `var(--surface-color-subtle)`
|
|
507
|
-
- `.surface-muted` - background-color: `var(--surface-color-muted)`
|
|
508
|
-
- `.surface-emphasis` - background-color: `var(--surface-color-emphasis)`
|
|
509
|
-
- `.surface-strong` - background-color: `var(--surface-color-strong)`
|
|
110
|
+
Atomic utility classes (`.p-md`, `.gap-md`, `.d-flex`, `.text-sm`, `.shadow-sm`, `.color-primary`, `.surface-subtle`) ship with the stylesheet. Prefer tokens on components over class soup.
|
|
510
111
|
|
|
511
|
-
|
|
112
|
+
## Agate.UX
|
|
512
113
|
|
|
513
|
-
-
|
|
514
|
-
- `.text-secondary` - color: `var(--text-color-secondary)`
|
|
515
|
-
- `.text-muted` - color: `var(--text-color-muted)`
|
|
516
|
-
- `.text-disabled` - color: `var(--text-color-disabled)`
|
|
114
|
+
Oriented-space vs client-space vs implementation-space:
|
|
517
115
|
|
|
518
|
-
|
|
116
|
+
| Oriented | Client | Impl |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| `--os-inset-x/y` | `--cs-inset-x/y` | `--im-inset-x/y` |
|
|
119
|
+
| `--os-drag-x/y` | `--cs-drag-x/y` | `--im-drag-x/y` |
|
|
120
|
+
| `--os-size-x/y` | `--cs-size-x/y` | `--im-size-x/y` |
|
|
519
121
|
|
|
520
|
-
|
|
521
|
-
- `.state-warning` - color: `var(--color-warning)`
|
|
522
|
-
- `.state-danger` - color: `var(--color-danger)`
|
|
122
|
+
Use `inset` for semi-static layout, `translate` for drag / animation. Orientation: `calc(var(--orient, 0) * 90deg)`. Measure in `@fest-lib/dom` Agate helpers.
|
|
523
123
|
|
|
524
|
-
|
|
124
|
+
## Workspace
|
|
525
125
|
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
```html
|
|
534
|
-
<div class="color-secondary surface-emphasis">
|
|
535
|
-
<div class="text-secondary state-warning">
|
|
536
|
-
</div>
|
|
537
|
-
</div>
|
|
126
|
+
```bash
|
|
127
|
+
cd modules/projects/veela.css
|
|
128
|
+
npm run demo # Vite
|
|
129
|
+
npm test # puppeteer
|
|
130
|
+
npm run build
|
|
131
|
+
npm run publish
|
|
538
132
|
```
|
|
539
133
|
|
|
540
|
-
|
|
541
|
-
<div class="color-accent surface-strong">
|
|
542
|
-
<div class="text-accent state-danger">
|
|
543
|
-
</div>
|
|
544
|
-
</div>
|
|
545
|
-
```
|
|
134
|
+
Guide: `guide/`. License: [MIT](LICENSE).
|
package/package.json
CHANGED