@profullstack/css 0.0.0-stage → 0.2.1
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/AGENTS.md +51 -0
- package/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +124 -2
- package/css/manifest.json +223 -0
- package/css/platform.css +380 -0
- package/css/profullstack.css +487 -0
- package/css/tokens.css +98 -0
- package/docs/agent-guide.md +115 -0
- package/docs/index.html +169 -0
- package/docs/tokens.json +55 -0
- package/examples/index.html +47 -0
- package/examples/invite-form.html +72 -0
- package/examples/platform.html +110 -0
- package/examples/project-dashboard.html +72 -0
- package/package.json +48 -4
package/css/platform.css
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Profullstack CSS: platform layer.
|
|
3
|
+
*
|
|
4
|
+
* The newest native CSS, applied to the same semantic markup and the same
|
|
5
|
+
* small vocabulary. Every rule is progressive enhancement: a browser that
|
|
6
|
+
* lacks a feature keeps the 0.1 baseline from profullstack.css, and nothing
|
|
7
|
+
* here hides content or depends on JavaScript.
|
|
8
|
+
*
|
|
9
|
+
* Everything lives in the pf.platform cascade layer, after pf.components and
|
|
10
|
+
* before pf.utilities, so any unlayered app rule still wins.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@layer pf.platform {
|
|
14
|
+
/* ------------------------------------------------------------------
|
|
15
|
+
* Page-level
|
|
16
|
+
* ------------------------------------------------------------------ */
|
|
17
|
+
|
|
18
|
+
:root {
|
|
19
|
+
/* Lets transitions run to and from height: auto (details, disclosures). */
|
|
20
|
+
interpolate-size: allow-keywords;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
html {
|
|
24
|
+
/* No layout jump when a dialog locks scrolling or content grows past the fold. */
|
|
25
|
+
scrollbar-gutter: stable;
|
|
26
|
+
scrollbar-color: var(--pf-color-border) transparent;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Scroll lock while a modal dialog is open, no script needed. */
|
|
30
|
+
:where(html:has(dialog[open]:modal)) {
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Cross-document view transitions: same-origin page loads cross-fade. */
|
|
35
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
36
|
+
@view-transition {
|
|
37
|
+
navigation: auto;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Hanging quotes and tighter CJK punctuation in long text. */
|
|
42
|
+
:where(.prose, blockquote) {
|
|
43
|
+
hanging-punctuation: first allow-end last;
|
|
44
|
+
text-spacing-trim: trim-start;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ------------------------------------------------------------------
|
|
48
|
+
* Corners: one token reshapes every surface.
|
|
49
|
+
* --pf-corner-shape: round (default) | squircle | bevel | scoop | notch
|
|
50
|
+
* ------------------------------------------------------------------ */
|
|
51
|
+
|
|
52
|
+
:where(.card, .surface, .alert, .badge, .carousel > *,
|
|
53
|
+
button, .button, input, select, textarea, fieldset,
|
|
54
|
+
dialog, [popover]) {
|
|
55
|
+
corner-shape: var(--pf-corner-shape, round);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ------------------------------------------------------------------
|
|
59
|
+
* Optical text alignment: trim the line box to cap height so labels sit
|
|
60
|
+
* dead-centre in buttons and badges.
|
|
61
|
+
* ------------------------------------------------------------------ */
|
|
62
|
+
|
|
63
|
+
@supports (text-box: trim-both cap alphabetic) {
|
|
64
|
+
:where(button, input[type="submit"], input[type="button"], input[type="reset"], .button) {
|
|
65
|
+
text-box: trim-both cap alphabetic;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.badge {
|
|
69
|
+
padding-block: 0.4rem;
|
|
70
|
+
text-box: trim-both cap alphabetic;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ------------------------------------------------------------------
|
|
75
|
+
* Forms
|
|
76
|
+
* ------------------------------------------------------------------ */
|
|
77
|
+
|
|
78
|
+
/* Errors appear after the person has interacted, not on page load. */
|
|
79
|
+
:where(input:user-invalid, select:user-invalid, textarea:user-invalid) {
|
|
80
|
+
border-color: var(--pf-color-danger);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Textareas without an explicit rows attribute grow with their content. */
|
|
84
|
+
@supports (field-sizing: content) {
|
|
85
|
+
:where(textarea:not([rows])) {
|
|
86
|
+
field-sizing: content;
|
|
87
|
+
max-block-size: 24rem;
|
|
88
|
+
min-block-size: 8rem;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Customizable <select>: a themed picker instead of the OS popup. */
|
|
93
|
+
@supports (appearance: base-select) {
|
|
94
|
+
:where(select:not([multiple]):not([size])),
|
|
95
|
+
:where(select:not([multiple]):not([size]))::picker(select) {
|
|
96
|
+
appearance: base-select;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:where(select:not([multiple]):not([size])) {
|
|
100
|
+
align-items: center;
|
|
101
|
+
display: flex;
|
|
102
|
+
gap: var(--pf-space-2);
|
|
103
|
+
justify-content: space-between;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:where(select:not([multiple]):not([size]))::picker-icon {
|
|
107
|
+
color: var(--pf-color-ink-muted);
|
|
108
|
+
transition: rotate var(--pf-transition-fast);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:where(select:not([multiple]):not([size])):open::picker-icon {
|
|
112
|
+
rotate: 180deg;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:where(select:not([multiple]):not([size]))::picker(select) {
|
|
116
|
+
background: var(--pf-color-surface);
|
|
117
|
+
border: 1px solid var(--pf-color-border);
|
|
118
|
+
border-radius: var(--pf-radius-sm);
|
|
119
|
+
box-shadow: var(--pf-shadow-md);
|
|
120
|
+
color: var(--pf-color-ink);
|
|
121
|
+
margin-block: var(--pf-space-1);
|
|
122
|
+
padding: var(--pf-space-1);
|
|
123
|
+
corner-shape: var(--pf-corner-shape, round);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:where(select:not([multiple]):not([size])) option {
|
|
127
|
+
border-radius: calc(var(--pf-radius-sm) - var(--pf-space-1));
|
|
128
|
+
gap: var(--pf-space-2);
|
|
129
|
+
padding: 0.55rem 0.7rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:where(select:not([multiple]):not([size])) option:is(:hover, :focus-visible) {
|
|
133
|
+
background: color-mix(in srgb, var(--pf-color-primary) 12%, transparent);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:where(select:not([multiple]):not([size])) option:checked {
|
|
137
|
+
font-weight: 650;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:where(select:not([multiple]):not([size])) option::checkmark {
|
|
141
|
+
color: var(--pf-color-primary);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* ------------------------------------------------------------------
|
|
146
|
+
* Disclosures: native <details> opens and closes with a height animation.
|
|
147
|
+
* ------------------------------------------------------------------ */
|
|
148
|
+
|
|
149
|
+
@supports selector(::details-content) {
|
|
150
|
+
:where(details)::details-content {
|
|
151
|
+
block-size: 0;
|
|
152
|
+
overflow-y: clip;
|
|
153
|
+
transition:
|
|
154
|
+
block-size var(--pf-transition-normal),
|
|
155
|
+
content-visibility var(--pf-transition-normal) allow-discrete;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:where(details[open])::details-content {
|
|
159
|
+
block-size: auto;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* ------------------------------------------------------------------
|
|
164
|
+
* Dialogs and popovers: entry and exit animation with @starting-style,
|
|
165
|
+
* light surfaces for [popover], and anchoring to the invoking button.
|
|
166
|
+
* ------------------------------------------------------------------ */
|
|
167
|
+
|
|
168
|
+
:where(dialog, [popover]) {
|
|
169
|
+
opacity: 0;
|
|
170
|
+
scale: 0.97;
|
|
171
|
+
transition:
|
|
172
|
+
opacity var(--pf-transition-normal),
|
|
173
|
+
scale var(--pf-transition-normal),
|
|
174
|
+
overlay var(--pf-transition-normal) allow-discrete,
|
|
175
|
+
display var(--pf-transition-normal) allow-discrete;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:where(dialog[open], [popover]:popover-open) {
|
|
179
|
+
opacity: 1;
|
|
180
|
+
scale: 1;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@starting-style {
|
|
184
|
+
:where(dialog[open], [popover]:popover-open) {
|
|
185
|
+
opacity: 0;
|
|
186
|
+
scale: 0.97;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:where(dialog)::backdrop {
|
|
191
|
+
background: rgb(7 18 19 / 0%);
|
|
192
|
+
transition:
|
|
193
|
+
background-color var(--pf-transition-normal),
|
|
194
|
+
overlay var(--pf-transition-normal) allow-discrete,
|
|
195
|
+
display var(--pf-transition-normal) allow-discrete;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:where(dialog[open])::backdrop {
|
|
199
|
+
background: rgb(7 18 19 / 62%);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@starting-style {
|
|
203
|
+
:where(dialog[open])::backdrop {
|
|
204
|
+
background: rgb(7 18 19 / 0%);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:where([popover]) {
|
|
209
|
+
background: var(--pf-color-surface);
|
|
210
|
+
border: 1px solid var(--pf-color-border);
|
|
211
|
+
border-radius: var(--pf-radius-md);
|
|
212
|
+
box-shadow: var(--pf-shadow-md);
|
|
213
|
+
color: var(--pf-color-ink);
|
|
214
|
+
max-inline-size: min(24rem, calc(100vw - 2rem));
|
|
215
|
+
padding: var(--pf-space-4);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:where([popover="hint"]) {
|
|
219
|
+
font-size: var(--pf-text-sm);
|
|
220
|
+
padding: var(--pf-space-2) var(--pf-space-3);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/*
|
|
224
|
+
* data-anchor on a popover opened by popovertarget (or commandfor) places
|
|
225
|
+
* it next to the button that opened it, flipping when space runs out.
|
|
226
|
+
* Without anchor positioning it stays a centred popover.
|
|
227
|
+
*/
|
|
228
|
+
@supports (position-area: block-end) {
|
|
229
|
+
:where([popover][data-anchor]) {
|
|
230
|
+
inset: auto;
|
|
231
|
+
margin: var(--pf-space-2) 0;
|
|
232
|
+
position-area: block-end span-inline-end;
|
|
233
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:where([popover][data-anchor="top"]) {
|
|
237
|
+
position-area: block-start span-inline-end;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:where([popover][data-anchor="end"]) {
|
|
241
|
+
margin: 0 var(--pf-space-2);
|
|
242
|
+
position-area: inline-end center;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* ------------------------------------------------------------------
|
|
247
|
+
* Carousel: a scroll-snap row everywhere; native scroll buttons and
|
|
248
|
+
* markers where ::scroll-button and ::scroll-marker exist. No script.
|
|
249
|
+
* ------------------------------------------------------------------ */
|
|
250
|
+
|
|
251
|
+
.carousel {
|
|
252
|
+
display: grid;
|
|
253
|
+
gap: var(--pf-space-4);
|
|
254
|
+
grid-auto-columns: min(85%, var(--pf-carousel-item, 20rem));
|
|
255
|
+
grid-auto-flow: column;
|
|
256
|
+
list-style: none;
|
|
257
|
+
margin: 0;
|
|
258
|
+
overflow-x: auto;
|
|
259
|
+
overscroll-behavior-x: contain;
|
|
260
|
+
padding: var(--pf-space-1) 0 var(--pf-space-3);
|
|
261
|
+
scroll-padding-inline: var(--pf-space-1);
|
|
262
|
+
scroll-snap-type: x mandatory;
|
|
263
|
+
scrollbar-width: thin;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.carousel > * {
|
|
267
|
+
scroll-snap-align: start;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@supports selector(::scroll-marker) {
|
|
271
|
+
.carousel {
|
|
272
|
+
anchor-name: --pf-carousel;
|
|
273
|
+
anchor-scope: --pf-carousel;
|
|
274
|
+
scroll-marker-group: after;
|
|
275
|
+
scrollbar-width: none;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.carousel::scroll-marker-group {
|
|
279
|
+
display: flex;
|
|
280
|
+
gap: var(--pf-space-2);
|
|
281
|
+
justify-content: center;
|
|
282
|
+
padding-block: var(--pf-space-2);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.carousel > *::scroll-marker {
|
|
286
|
+
background: var(--pf-color-border);
|
|
287
|
+
border-radius: var(--pf-radius-pill);
|
|
288
|
+
block-size: 0.55rem;
|
|
289
|
+
content: "";
|
|
290
|
+
inline-size: 0.55rem;
|
|
291
|
+
transition: inline-size var(--pf-transition-fast), background-color var(--pf-transition-fast);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.carousel > *::scroll-marker:target-current {
|
|
295
|
+
background: var(--pf-color-primary);
|
|
296
|
+
inline-size: 1.6rem;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.carousel::scroll-button(*) {
|
|
300
|
+
align-items: center;
|
|
301
|
+
background: var(--pf-color-surface);
|
|
302
|
+
block-size: 2.5rem;
|
|
303
|
+
border: 1px solid var(--pf-color-border);
|
|
304
|
+
border-radius: var(--pf-radius-pill);
|
|
305
|
+
box-shadow: var(--pf-shadow-sm);
|
|
306
|
+
color: var(--pf-color-ink);
|
|
307
|
+
cursor: pointer;
|
|
308
|
+
display: inline-flex;
|
|
309
|
+
inline-size: 2.5rem;
|
|
310
|
+
justify-content: center;
|
|
311
|
+
position: absolute;
|
|
312
|
+
position-anchor: --pf-carousel;
|
|
313
|
+
position-area: center;
|
|
314
|
+
z-index: 1;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.carousel::scroll-button(*):disabled {
|
|
318
|
+
cursor: default;
|
|
319
|
+
opacity: 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.carousel::scroll-button(*):not(:disabled):hover {
|
|
323
|
+
border-color: var(--pf-color-primary);
|
|
324
|
+
color: var(--pf-color-primary);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.carousel::scroll-button(inline-start) {
|
|
328
|
+
content: "←" / "Previous";
|
|
329
|
+
justify-self: start;
|
|
330
|
+
margin-inline-start: var(--pf-space-2);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.carousel::scroll-button(inline-end) {
|
|
334
|
+
content: "→" / "Next";
|
|
335
|
+
justify-self: end;
|
|
336
|
+
margin-inline-end: var(--pf-space-2);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/* ------------------------------------------------------------------
|
|
341
|
+
* Gap decorations: data-rules draws lines in the gaps of a .grid or
|
|
342
|
+
* .cluster, with no borders or pseudo-elements on the children.
|
|
343
|
+
* ------------------------------------------------------------------ */
|
|
344
|
+
|
|
345
|
+
@supports (row-rule: 1px solid) {
|
|
346
|
+
:where(.grid, .cluster)[data-rules] {
|
|
347
|
+
column-rule: 1px solid var(--pf-color-border);
|
|
348
|
+
row-rule: 1px solid var(--pf-color-border);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* ------------------------------------------------------------------
|
|
353
|
+
* Scroll reveal: children of [data-reveal] fade up as they scroll into
|
|
354
|
+
* view, staggered by sibling-index(). Content that is already on screen
|
|
355
|
+
* or in a browser without scroll timelines is simply visible.
|
|
356
|
+
* ------------------------------------------------------------------ */
|
|
357
|
+
|
|
358
|
+
@keyframes pf-reveal {
|
|
359
|
+
from {
|
|
360
|
+
opacity: 0;
|
|
361
|
+
translate: 0 1.25rem;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
366
|
+
@supports (animation-timeline: view()) {
|
|
367
|
+
:where([data-reveal]) > * {
|
|
368
|
+
animation: pf-reveal linear both;
|
|
369
|
+
animation-range: entry 0% entry 70%;
|
|
370
|
+
animation-timeline: view();
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
@supports (animation-timeline: view()) and (inline-size: calc(sibling-index() * 1px)) {
|
|
375
|
+
:where([data-reveal]) > * {
|
|
376
|
+
animation-range-start: entry calc(min(sibling-index() - 1, 6) * 6%);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|