actual-css 0.19.4 → 0.20.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/CHANGELOG.md +67 -0
- package/README.md +6 -6
- package/components.json +6 -3
- package/dist/actual.full.css +249 -50
- package/dist/actual.full.js +2 -2
- package/dist/actual.full.min.css +1 -1
- package/dist/types/menu.d.ts +2 -5
- package/docs/pages/components/accordion.md +11 -6
- package/docs/pages/components/alert.md +64 -62
- package/docs/pages/components/avatar.md +12 -12
- package/docs/pages/components/badge.md +15 -15
- package/docs/pages/components/breadcrumb.md +10 -8
- package/docs/pages/components/button.md +56 -7
- package/docs/pages/components/card.md +21 -21
- package/docs/pages/components/dialog.md +97 -69
- package/docs/pages/components/drawer.md +33 -33
- package/docs/pages/components/indicator.md +12 -12
- package/docs/pages/components/navbar.md +41 -9
- package/docs/pages/components/pagination.md +7 -7
- package/docs/pages/components/progress.md +18 -13
- package/docs/pages/components/rating.md +19 -19
- package/docs/pages/components/reveal.md +2 -0
- package/docs/pages/components/segmented.md +35 -31
- package/docs/pages/components/skeleton.md +10 -8
- package/docs/pages/components/spinner.md +21 -15
- package/docs/pages/components/table.md +26 -28
- package/docs/pages/enhancements/flyout.md +94 -43
- package/docs/pages/enhancements/in-view.md +3 -1
- package/docs/pages/enhancements/scrollspy.md +51 -18
- package/docs/pages/enhancements/tabs.md +43 -37
- package/docs/pages/enhancements/tooltip.md +4 -2
- package/docs/pages/forms/ajax.md +66 -0
- package/docs/pages/forms/choice-cards.md +8 -8
- package/docs/pages/forms/color-swatches.md +12 -12
- package/docs/pages/forms/form-actions.md +23 -0
- package/docs/pages/forms/joined-controls.md +8 -8
- package/docs/pages/forms/labels.md +11 -11
- package/docs/pages/forms/overview.md +35 -29
- package/docs/pages/forms/states-and-sizes.md +9 -9
- package/docs/pages/forms/switch.md +35 -2
- package/docs/pages/forms/validation.md +16 -16
- package/docs/pages/foundations/theming.md +32 -2
- package/docs/pages/foundations/tokens.md +18 -16
- package/docs/pages/guides/coding-agents.md +18 -0
- package/docs/pages/guides/introduction.md +1 -1
- package/llms.txt +3 -3
- package/package.json +5 -5
- package/reserved-classes.json +1 -0
- package/skills/actual-css/SKILL.md +7 -0
- package/src/cli/actual-css.js +3 -3
- package/src/css/components/badge.css +10 -6
- package/src/css/components/button.css +20 -7
- package/src/css/components/join.css +14 -4
- package/src/css/components/navbar.css +83 -1
- package/src/css/components/pagination.css +3 -1
- package/src/css/components/segmented.css +27 -7
- package/src/css/core/theme.css +11 -9
- package/src/css/core/tokens.css +7 -1
- package/src/css/core/variants.css +2 -0
- package/src/css/effects/reveal.css +15 -6
- package/src/css/forms/control.css +11 -1
- package/src/css/forms/form.css +14 -4
- package/src/css/forms/switch.css +32 -3
- package/src/js/ajax.js +18 -1
- package/src/js/context-menu.js +1 -3
- package/src/js/flyout.js +14 -5
- package/src/js/in-view.js +41 -30
- package/src/js/menu.js +9 -21
- package/src/js/surface.js +38 -0
- package/src/tooling/design-tokens.js +1 -0
- package/src/tooling/theme-contrast.js +24 -9
- package/tokens.json +1 -0
- package/docs/design-notes/accessibility-decisions.md +0 -63
- package/docs/design-notes/app-ui.md +0 -67
- package/docs/design-notes/architecture.md +0 -70
- package/docs/design-notes/browser-support.md +0 -239
- package/docs/design-notes/cascade-layer.md +0 -74
- package/docs/design-notes/column-layout.md +0 -260
- package/docs/design-notes/css-anchor.md +0 -87
- package/docs/design-notes/enhancement-contract.md +0 -193
- package/docs/design-notes/forced-colors.md +0 -123
- package/docs/design-notes/grid.md +0 -785
- package/docs/design-notes/motion-cost.md +0 -62
- package/docs/design-notes/naming.md +0 -71
- package/docs/design-notes/platform-alignment.md +0 -602
- package/docs/design-notes/popover-manual-poc.md +0 -328
- package/docs/design-notes/references.md +0 -336
- package/docs/design-notes/rich-text.md +0 -61
- package/docs/design-notes/spacing-units.md +0 -286
- package/docs/design-notes/steps.md +0 -776
- package/docs/design-notes/surface-reparenting.md +0 -130
- package/docs/design-notes/tokens.md +0 -166
- package/docs/design-notes/tooltip-coordinate-space.md +0 -130
- package/docs/design-notes/widget-primitives.md +0 -144
- package/docs/navigation.json +0 -176
|
@@ -1,602 +0,0 @@
|
|
|
1
|
-
# Platform alignment
|
|
2
|
-
|
|
3
|
-
Actual CSS should stay close to the direction of the web platform.
|
|
4
|
-
|
|
5
|
-
HTML, CSS, ARIA, and browser APIs continue to absorb behaviors that historically required framework components or JavaScript widgets. Open UI is a particularly useful signal because it studies common design-system patterns and explores how they can become native platform capabilities.
|
|
6
|
-
|
|
7
|
-
This note does not define a browser support policy and is not a commitment to implement experimental proposals.
|
|
8
|
-
|
|
9
|
-
Its purpose is architectural:
|
|
10
|
-
|
|
11
|
-
> When the platform eventually provides a capability natively, Actual should be able to adopt it by removing code rather than redesigning its public API.
|
|
12
|
-
|
|
13
|
-
## Core principle
|
|
14
|
-
|
|
15
|
-
Actual should prefer this progression:
|
|
16
|
-
|
|
17
|
-
```text
|
|
18
|
-
native HTML
|
|
19
|
-
↓
|
|
20
|
-
native HTML + CSS
|
|
21
|
-
↓
|
|
22
|
-
native HTML + progressive enhancement
|
|
23
|
-
↓
|
|
24
|
-
small reusable behavior primitive
|
|
25
|
-
↓
|
|
26
|
-
Actual component
|
|
27
|
-
↓
|
|
28
|
-
application-specific widget
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
The further down this list a feature sits, the stronger the justification should be.
|
|
32
|
-
|
|
33
|
-
A framework component should not exist merely because the platform does not provide a convenient primitive today.
|
|
34
|
-
|
|
35
|
-
## Design for deletion
|
|
36
|
-
|
|
37
|
-
Progressive enhancement is not only about supporting older browsers.
|
|
38
|
-
|
|
39
|
-
It should also make framework code temporary.
|
|
40
|
-
|
|
41
|
-
When Actual implements behavior that browsers may eventually provide, the implementation should be structured so that native support can replace one responsibility at a time.
|
|
42
|
-
|
|
43
|
-
For example, a floating interactive surface can involve several independent concerns:
|
|
44
|
-
|
|
45
|
-
```text
|
|
46
|
-
surface
|
|
47
|
-
positioning
|
|
48
|
-
open / close lifecycle
|
|
49
|
-
light dismiss
|
|
50
|
-
focus management
|
|
51
|
-
keyboard navigation
|
|
52
|
-
command invocation
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
These should not unnecessarily become one monolithic widget.
|
|
56
|
-
|
|
57
|
-
The platform is evolving these responsibilities independently. Actual should do the same.
|
|
58
|
-
|
|
59
|
-
This is the motivation behind reusable primitives such as `surface`, `floating`, `menu`, `keys`, and `command`.
|
|
60
|
-
|
|
61
|
-
A future native primitive should ideally replace one of these pieces without forcing unrelated behavior or styling to change.
|
|
62
|
-
|
|
63
|
-
## Follow semantics, not proposal syntax
|
|
64
|
-
|
|
65
|
-
Open UI proposals are useful directional signals, but experimental syntax is not an Actual API.
|
|
66
|
-
|
|
67
|
-
Actual should not prematurely reproduce proposed HTML attributes or elements as `data-*` APIs.
|
|
68
|
-
|
|
69
|
-
For example, if the platform is exploring:
|
|
70
|
-
|
|
71
|
-
```html
|
|
72
|
-
<div focusgroup="toolbar">
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Actual should not automatically introduce:
|
|
76
|
-
|
|
77
|
-
```html
|
|
78
|
-
<div data-focusgroup="toolbar">
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Instead, the underlying behavior can influence the design of a reusable JavaScript primitive.
|
|
82
|
-
|
|
83
|
-
If native `focusgroup` later becomes broadly available, the JavaScript implementation can become a fallback or disappear.
|
|
84
|
-
|
|
85
|
-
The important thing to copy early is the **responsibility boundary**, not necessarily the proposed syntax.
|
|
86
|
-
|
|
87
|
-
## Preserve native-shaped markup
|
|
88
|
-
|
|
89
|
-
When a useful platform feature can be added without harming unsupported browsers, documentation should prefer markup that remains compatible with that future.
|
|
90
|
-
|
|
91
|
-
For example, Actual's switch is intentionally based on a real checkbox:
|
|
92
|
-
|
|
93
|
-
```html
|
|
94
|
-
<input type="checkbox" class="switch">
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
If a native switch attribute becomes appropriate for the supported browser contract, the same component can evolve toward:
|
|
98
|
-
|
|
99
|
-
```html
|
|
100
|
-
<input type="checkbox" class="switch" switch>
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
without replacing the element or changing the styling API.
|
|
104
|
-
|
|
105
|
-
The class remains responsible for appearance.
|
|
106
|
-
|
|
107
|
-
The platform remains responsible for semantics and behavior.
|
|
108
|
-
|
|
109
|
-
This separation is desirable.
|
|
110
|
-
|
|
111
|
-
## Public classes should survive platform evolution
|
|
112
|
-
|
|
113
|
-
Actual classes should generally describe visual or compositional concepts rather than reimplement browser mechanics.
|
|
114
|
-
|
|
115
|
-
For example:
|
|
116
|
-
|
|
117
|
-
```text
|
|
118
|
-
.switch
|
|
119
|
-
.modal
|
|
120
|
-
.drawer
|
|
121
|
-
.tooltip
|
|
122
|
-
.toolbar
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
may remain useful styling hooks even if more of their semantics and behavior eventually become native.
|
|
126
|
-
|
|
127
|
-
This means platform adoption should not require unnecessary class churn.
|
|
128
|
-
|
|
129
|
-
A successful transition may look like:
|
|
130
|
-
|
|
131
|
-
```text
|
|
132
|
-
Actual class + Actual JavaScript
|
|
133
|
-
↓
|
|
134
|
-
Actual class + small fallback
|
|
135
|
-
↓
|
|
136
|
-
Actual class + native HTML
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
rather than replacing one framework API with another.
|
|
140
|
-
|
|
141
|
-
## Surface responsibility split
|
|
142
|
-
|
|
143
|
-
Anchored surfaces are the clearest case where the platform is absorbing one
|
|
144
|
-
responsibility at a time rather than a whole widget. Keeping the axes named
|
|
145
|
-
separately is what lets each be replaced on its own schedule:
|
|
146
|
-
|
|
147
|
-
```text
|
|
148
|
-
Popover = where the surface lives
|
|
149
|
-
floating = where it is placed
|
|
150
|
-
surface.js = when and how it opens
|
|
151
|
-
flyout / tooltip = what it looks like
|
|
152
|
-
menu = how its content behaves
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
The value of the split is that each line can change owner independently.
|
|
156
|
-
Popover can take over the top layer without touching placement. Anchor
|
|
157
|
-
positioning could later take over placement without touching lifecycle — though
|
|
158
|
-
not yet, because the current positioner also reports *placement validity*, which
|
|
159
|
-
the lifecycle uses to close a surface whose anchor has left the viewport, and
|
|
160
|
-
declarative CSS positioning offers no equivalent signal. See
|
|
161
|
-
[css-anchor](css-anchor.md) for what else the positioner writes and what would
|
|
162
|
-
unblock the move.
|
|
163
|
-
|
|
164
|
-
### Top-layer transport must not imply lifecycle ownership
|
|
165
|
-
|
|
166
|
-
A capability that solves one problem is not an invitation to hand it the
|
|
167
|
-
neighbouring ones. Popover bundles a transport — promotion to the top layer —
|
|
168
|
-
with a lifecycle, and the two are separable: `popover="manual"` supplies the
|
|
169
|
-
transport and nothing else.
|
|
170
|
-
|
|
171
|
-
That separation is what lets Actual use the native top layer while remaining
|
|
172
|
-
the owner of:
|
|
173
|
-
|
|
174
|
-
```text
|
|
175
|
-
.is-open
|
|
176
|
-
Escape ordering
|
|
177
|
-
inside / outside dismissal
|
|
178
|
-
focus restoration
|
|
179
|
-
sheet policy
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
The slide to guard against is "we are using Popover, so we should use its
|
|
183
|
-
lifecycle too". Those are two decisions, taken on different evidence. The
|
|
184
|
-
transport is judged on what it removes; the lifecycle is judged on whether the
|
|
185
|
-
component contract survives it — and for Flyout it does not, because
|
|
186
|
-
`data-flyout-auto-close` defaults to closing on an inside click, which native
|
|
187
|
-
light-dismiss cannot express.
|
|
188
|
-
|
|
189
|
-
The rule cuts the other way too, and that is where the boundary actually falls:
|
|
190
|
-
a capability is not obliged to take on a responsibility just because it looks
|
|
191
|
-
adjacent. A native `::backdrop` is painted for a manual popover and even
|
|
192
|
-
inherits custom properties from its originating element, but its UA
|
|
193
|
-
`pointer-events: none` is not overridable from author CSS — not with
|
|
194
|
-
`!important` either, since a UA `!important` outranks an author one. So it
|
|
195
|
-
cannot do the scrim's second job, absorbing the pointer, and the scrim stays an
|
|
196
|
-
Actual element. Adopting the transport did not make the platform responsible
|
|
197
|
-
for everything the old transport happened to carry.
|
|
198
|
-
|
|
199
|
-
### Ceding the properties a capability is expressed through
|
|
200
|
-
|
|
201
|
-
Keeping presentation and behavior separate is not enough on its own, because
|
|
202
|
-
CSS expresses some behavior *as* presentation.
|
|
203
|
-
|
|
204
|
-
> A presentation class that composes with `popover` may own its visible display
|
|
205
|
-
> type, but must not override the platform's hidden-state display.
|
|
206
|
-
|
|
207
|
-
`.flyout { display: grid }` is entirely legitimate. The problem is that the UA
|
|
208
|
-
closes a popover with `display: none`, and an author declaration beats the UA
|
|
209
|
-
origin whatever the specificity — so that legitimate choice silently leaves a
|
|
210
|
-
closed popover painted on screen. The class was not implementing the lifecycle;
|
|
211
|
-
it was overriding the property the lifecycle is written in.
|
|
212
|
-
|
|
213
|
-
The general rule, then:
|
|
214
|
-
|
|
215
|
-
> A class that is advertised as composing with a platform capability must cede
|
|
216
|
-
> the properties that capability uses to express itself, for the states the
|
|
217
|
-
> platform owns.
|
|
218
|
-
|
|
219
|
-
This is checkable rather than aspirational: any Actual class that carries a
|
|
220
|
-
`[popover]` reset must also restore `display` for `:not(:popover-open)`.
|
|
221
|
-
|
|
222
|
-
The corresponding trap is adopting a capability in a way that adds an axis
|
|
223
|
-
instead of replacing one. A second surface transport living alongside the
|
|
224
|
-
existing one would have left the DOM-reparenting code in place while doubling
|
|
225
|
-
the behavior matrix, which is the opposite of the deletion this note asks for.
|
|
226
|
-
That is why the top-layer transport was adopted by raising the floor rather
|
|
227
|
-
than behind a capability branch: the axis was replaced, not added. Counting
|
|
228
|
-
lines was the weaker half of the criterion — the transport removed one concept
|
|
229
|
-
and a defect while the file grew by five lines. See
|
|
230
|
-
[popover-manual-poc](popover-manual-poc.md).
|
|
231
|
-
|
|
232
|
-
## Prefer capabilities over browser generations
|
|
233
|
-
|
|
234
|
-
New platform features should not automatically raise Actual's Minimal browser floor.
|
|
235
|
-
|
|
236
|
-
When a modern capability has a cheap functional fallback, it should normally be used as progressive enhancement.
|
|
237
|
-
|
|
238
|
-
This applies especially to features concerned with:
|
|
239
|
-
|
|
240
|
-
* presentation;
|
|
241
|
-
* positioning;
|
|
242
|
-
* animation;
|
|
243
|
-
* interaction convenience;
|
|
244
|
-
* declarative invocation;
|
|
245
|
-
* richer native controls.
|
|
246
|
-
|
|
247
|
-
The Minimal tier should move when the framework genuinely needs a capability for its supported contract, not simply because a newer API produces a nicer implementation.
|
|
248
|
-
|
|
249
|
-
## Current platform directions
|
|
250
|
-
|
|
251
|
-
The following areas are particularly relevant to Actual's architecture.
|
|
252
|
-
|
|
253
|
-
Their specifications and exact syntax may change. The important part is the direction they indicate.
|
|
254
|
-
|
|
255
|
-
### Focus groups
|
|
256
|
-
|
|
257
|
-
Focus-group proposals aim to provide common keyboard and focus behavior for collections of related controls.
|
|
258
|
-
|
|
259
|
-
This overlaps with behavior currently implemented through keyboard helpers such as next-item, previous-item, first-item, and last-item navigation.
|
|
260
|
-
|
|
261
|
-
**Influence on Actual:**
|
|
262
|
-
|
|
263
|
-
* keep keyboard navigation reusable rather than widget-specific;
|
|
264
|
-
* consider a reusable focus-group primitive internally;
|
|
265
|
-
* let tabs, menus, toolbars, and similar patterns share it;
|
|
266
|
-
* avoid exposing speculative `focusgroup`-like HTML syntax prematurely.
|
|
267
|
-
|
|
268
|
-
This is a strong candidate for code that could eventually shrink when native focus-group behavior becomes available.
|
|
269
|
-
|
|
270
|
-
### Toolbar
|
|
271
|
-
|
|
272
|
-
Toolbar proposals combine a semantic group of controls with conventional keyboard navigation.
|
|
273
|
-
|
|
274
|
-
Actual already has most of the visual building blocks through buttons, actions, clusters, and keyboard helpers.
|
|
275
|
-
|
|
276
|
-
**Influence on Actual:**
|
|
277
|
-
|
|
278
|
-
A toolbar may be a useful small pattern, but its keyboard contract should preferably be built on a shared focus primitive rather than implemented independently.
|
|
279
|
-
|
|
280
|
-
Do not add `.toolbar` merely as another horizontal flex utility. If Toolbar is ever added, it is a semantic and keyboard enhancement over existing layout, with no CSS class of its own:
|
|
281
|
-
|
|
282
|
-
```html
|
|
283
|
-
<div class="cluster" role="toolbar" aria-label="Formatting" data-enhance="toolbar">
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
`.cluster` owns the layout, the controls keep their own presentation, `role="toolbar"` carries the semantics, and the enhancement supplies only the roving tab stop — which is `connectFocusGroup` almost exactly as it already exists. APG reserves the pattern for groups of at least three controls; below that the grouping earns nothing.
|
|
287
|
-
|
|
288
|
-
### Menu elements
|
|
289
|
-
|
|
290
|
-
The platform is exploring native menu structures with menu items, submenus, popover behavior, anchor positioning, commands, focus management, and keyboard navigation.
|
|
291
|
-
|
|
292
|
-
This strongly validates keeping these responsibilities separate in Actual.
|
|
293
|
-
|
|
294
|
-
**Influence on Actual:**
|
|
295
|
-
|
|
296
|
-
* `surface` should not own menu semantics;
|
|
297
|
-
* `floating` should not own menu lifecycle;
|
|
298
|
-
* `menu` should not unnecessarily own positioning;
|
|
299
|
-
* keyboard behavior should remain reusable;
|
|
300
|
-
* command invocation should remain independent.
|
|
301
|
-
|
|
302
|
-
Actual should not attempt to reproduce a future native menu element API.
|
|
303
|
-
|
|
304
|
-
Instead, its current primitives should make eventual native menus easy to adopt.
|
|
305
|
-
|
|
306
|
-
### Interest invokers and hint popovers
|
|
307
|
-
|
|
308
|
-
The platform is moving toward declarative ways to express that focus, hover, or other user interest should reveal contextual content.
|
|
309
|
-
|
|
310
|
-
This overlaps substantially with tooltip and hover-card behavior.
|
|
311
|
-
|
|
312
|
-
**Influence on Actual:**
|
|
313
|
-
|
|
314
|
-
* keep tooltip appearance separate from invocation mechanics;
|
|
315
|
-
* avoid making hover timers or pointer handling part of the visual component contract;
|
|
316
|
-
* prefer native popover lifecycle where possible;
|
|
317
|
-
* structure tooltip enhancement so future native interest invocation can remove JavaScript.
|
|
318
|
-
|
|
319
|
-
Tooltip is a good example of a component whose implementation should become smaller over time.
|
|
320
|
-
|
|
321
|
-
### Openable content
|
|
322
|
-
|
|
323
|
-
A generic openable primitive is being explored for content that can be shown and hidden without imposing a new semantic element.
|
|
324
|
-
|
|
325
|
-
This overlaps with the territory traditionally occupied by generic framework `collapse` widgets.
|
|
326
|
-
|
|
327
|
-
**Influence on Actual:**
|
|
328
|
-
|
|
329
|
-
Do not add a generic Collapse component simply to match other frameworks.
|
|
330
|
-
|
|
331
|
-
Use semantic platform elements where they already exist:
|
|
332
|
-
|
|
333
|
-
* `<details>` for disclosure;
|
|
334
|
-
* `<dialog>` for modal or dialog-like surfaces;
|
|
335
|
-
* popovers for transient surfaces.
|
|
336
|
-
|
|
337
|
-
Application-specific show/hide behavior can remain application code.
|
|
338
|
-
|
|
339
|
-
If the platform eventually gains a generic openable mechanism, this gap may disappear naturally.
|
|
340
|
-
|
|
341
|
-
### Customizable and filterable select
|
|
342
|
-
|
|
343
|
-
Native `<select>` is becoming substantially more customizable, and further work is exploring filtering and richer option behavior.
|
|
344
|
-
|
|
345
|
-
**Influence on Actual:**
|
|
346
|
-
|
|
347
|
-
Actual should continue to improve native select progressively rather than introducing a replacement select widget into core.
|
|
348
|
-
|
|
349
|
-
Avoid owning:
|
|
350
|
-
|
|
351
|
-
* option synchronization;
|
|
352
|
-
* keyboard selection models;
|
|
353
|
-
* popup lifecycle;
|
|
354
|
-
* active-option state;
|
|
355
|
-
* form integration;
|
|
356
|
-
|
|
357
|
-
when the platform is actively moving toward providing those capabilities.
|
|
358
|
-
|
|
359
|
-
A third-party autocomplete or advanced combobox can still compose Actual primitives when needed.
|
|
360
|
-
|
|
361
|
-
Repeated low-level needs discovered there may justify reusable primitives, but not necessarily a core widget.
|
|
362
|
-
|
|
363
|
-
### Link area delegation
|
|
364
|
-
|
|
365
|
-
The platform is exploring safer ways to make larger content areas delegate activation to a link while preserving nested interactions and text selection.
|
|
366
|
-
|
|
367
|
-
This overlaps with patterns such as Bootstrap's stretched links and pseudo-element link overlays.
|
|
368
|
-
|
|
369
|
-
**Influence on Actual:**
|
|
370
|
-
|
|
371
|
-
Do not introduce a generic `.stretched-link` workaround.
|
|
372
|
-
|
|
373
|
-
Prefer an explicit primary link today.
|
|
374
|
-
|
|
375
|
-
Wait for a native solution to the more general clickable-card problem.
|
|
376
|
-
|
|
377
|
-
### Enhanced range controls
|
|
378
|
-
|
|
379
|
-
Work on richer native range controls may eventually expose more consistent styling parts and more advanced range interactions.
|
|
380
|
-
|
|
381
|
-
**Influence on Actual:**
|
|
382
|
-
|
|
383
|
-
Avoid building a large custom range abstraction around browser-specific pseudo-elements unless a concrete project requirement justifies it.
|
|
384
|
-
|
|
385
|
-
Prefer native controls and progressive styling.
|
|
386
|
-
|
|
387
|
-
The concrete signal to watch is `appearance: base-slider` with `::slider-track`, `::slider-fill`, and `::slider-thumb`. Checked on Chrome 152: `CSS.supports('appearance', 'base-slider')` and `CSS.supports('selector(::slider-fill)')` are both false, so there is nothing to enhance against yet.
|
|
388
|
-
|
|
389
|
-
Until then, `.range` intentionally omits tick marks, and its filled track comes
|
|
390
|
-
from the `range` enhancement (one `--range-progress` share driving a
|
|
391
|
-
track gradient) rather than engine-specific pseudo-elements:
|
|
392
|
-
|
|
393
|
-
- The Chromium filled-track trick needs `overflow: hidden` on the runnable track plus a large `box-shadow` on the thumb. It collides twice with `range.css`: the thumb is wider than the track and would be clipped, and the thumb's `box-shadow` is already owned by the focus ring.
|
|
394
|
-
- CSS-only tick marks need a step count duplicated out of `min`/`max`/`step` into a custom property, so markup carries the same contract twice and the two can diverge. `datalist` cannot carry it either: its native ticks are part of the appearance that `appearance: none` removes, and no engine renders `<option label>` for a range — Actual reads the datalist as data only.
|
|
395
|
-
|
|
396
|
-
When the base-slider parts become interoperable, the `--range-progress`
|
|
397
|
-
calculation becomes a `@supports` enhancement in the shape of
|
|
398
|
-
`custom-select.css` — less engine-specific CSS, not more.
|
|
399
|
-
|
|
400
|
-
### Navigation
|
|
401
|
-
|
|
402
|
-
Native navigation proposals may eventually provide richer semantics and interaction behavior for complex navigation structures.
|
|
403
|
-
|
|
404
|
-
**Influence on Actual:**
|
|
405
|
-
|
|
406
|
-
Keep `.navbar` a small layout/presentation pattern.
|
|
407
|
-
|
|
408
|
-
Compose complex behaviors from existing primitives such as flyouts, drawers, commands, and menus rather than turning Navbar into a large JavaScript widget.
|
|
409
|
-
|
|
410
|
-
### Invoker commands
|
|
411
|
-
|
|
412
|
-
Declarative command invocation is an important platform direction because it separates the element requesting an action from the element implementing it.
|
|
413
|
-
|
|
414
|
-
This maps well to Actual's preference for semantic HTML and small behavior primitives.
|
|
415
|
-
|
|
416
|
-
**Influence on Actual:**
|
|
417
|
-
|
|
418
|
-
Prefer native commands where available and appropriate.
|
|
419
|
-
|
|
420
|
-
When fallback behavior is needed, keep it generic rather than implementing separate invocation systems inside Modal, Drawer, Popover, and other widgets.
|
|
421
|
-
|
|
422
|
-
## Decision framework
|
|
423
|
-
|
|
424
|
-
Before adding a new Actual component or JavaScript behavior, ask these questions in order.
|
|
425
|
-
|
|
426
|
-
### 1. Does semantic HTML already solve it?
|
|
427
|
-
|
|
428
|
-
Prefer native elements such as:
|
|
429
|
-
|
|
430
|
-
```text
|
|
431
|
-
button
|
|
432
|
-
details
|
|
433
|
-
dialog
|
|
434
|
-
select
|
|
435
|
-
input
|
|
436
|
-
progress
|
|
437
|
-
meter
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
when their semantics match the requirement.
|
|
441
|
-
|
|
442
|
-
### 2. Is the missing part mainly styling?
|
|
443
|
-
|
|
444
|
-
If so, add CSS rather than JavaScript.
|
|
445
|
-
|
|
446
|
-
### 3. Can a modern platform capability solve it progressively?
|
|
447
|
-
|
|
448
|
-
Use the capability when unsupported browsers retain an acceptable functional result.
|
|
449
|
-
|
|
450
|
-
Do not raise the Minimal floor unnecessarily.
|
|
451
|
-
|
|
452
|
-
### 4. Is the platform actively moving toward this capability?
|
|
453
|
-
|
|
454
|
-
Check HTML, CSS, ARIA, and Open UI direction before inventing a framework abstraction.
|
|
455
|
-
|
|
456
|
-
A proposal is not a reason to wait indefinitely, but it is a reason to avoid designing an API directly against a temporary platform limitation.
|
|
457
|
-
|
|
458
|
-
### 5. Is there a smaller reusable behavior underneath the requested widget?
|
|
459
|
-
|
|
460
|
-
Prefer:
|
|
461
|
-
|
|
462
|
-
```text
|
|
463
|
-
focus navigation
|
|
464
|
-
floating positioning
|
|
465
|
-
surface lifecycle
|
|
466
|
-
command invocation
|
|
467
|
-
selection state
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
over a monolithic component when several widgets share the same responsibility.
|
|
471
|
-
|
|
472
|
-
### 6. Is the behavior actually framework-level?
|
|
473
|
-
|
|
474
|
-
If it is highly application-specific, leave it to project code.
|
|
475
|
-
|
|
476
|
-
Actual does not need to provide every interaction pattern found in application UI.
|
|
477
|
-
|
|
478
|
-
## Adoption levels
|
|
479
|
-
|
|
480
|
-
Platform developments can influence Actual at different stages.
|
|
481
|
-
|
|
482
|
-
### Adopt
|
|
483
|
-
|
|
484
|
-
Use the native feature directly when it is part of the supported contract or has a safe fallback.
|
|
485
|
-
|
|
486
|
-
Examples include mature semantic HTML and suitable progressive enhancements.
|
|
487
|
-
|
|
488
|
-
### Align
|
|
489
|
-
|
|
490
|
-
The native feature is not ready to depend on, but its architecture is sufficiently useful to influence Actual's internal boundaries.
|
|
491
|
-
|
|
492
|
-
Focus-group behavior is a good example.
|
|
493
|
-
|
|
494
|
-
### Watch
|
|
495
|
-
|
|
496
|
-
The proposal solves a relevant problem but is too early, uncertain, or specialized to affect code today.
|
|
497
|
-
|
|
498
|
-
Document the direction and avoid unnecessary competing abstractions.
|
|
499
|
-
|
|
500
|
-
### Ignore
|
|
501
|
-
|
|
502
|
-
Not every platform proposal belongs in Actual.
|
|
503
|
-
|
|
504
|
-
A capability may be useful for applications without being appropriate for a small CSS framework.
|
|
505
|
-
|
|
506
|
-
## What Open UI should not become for Actual
|
|
507
|
-
|
|
508
|
-
Open UI is not a backlog of components to implement.
|
|
509
|
-
|
|
510
|
-
Actual should not:
|
|
511
|
-
|
|
512
|
-
* mirror every Open UI component;
|
|
513
|
-
* polyfill every proposal;
|
|
514
|
-
* expose experimental syntax under `data-*` names;
|
|
515
|
-
* add components solely because another framework has them;
|
|
516
|
-
* maintain custom widgets that duplicate improving native controls;
|
|
517
|
-
* raise browser requirements just to adopt newer syntax;
|
|
518
|
-
* freeze an experimental proposal into the public Actual API.
|
|
519
|
-
|
|
520
|
-
The objective is compatibility of **architecture**, not API imitation.
|
|
521
|
-
|
|
522
|
-
## Near-term implications
|
|
523
|
-
|
|
524
|
-
The current direction suggests a few concrete actions.
|
|
525
|
-
|
|
526
|
-
### Focus navigation
|
|
527
|
-
|
|
528
|
-
Audit `keys` around the responsibilities described by focus groups.
|
|
529
|
-
|
|
530
|
-
If several widgets need the same roving-focus behavior, extract one reusable primitive rather than adding separate implementations.
|
|
531
|
-
|
|
532
|
-
### Toolbar
|
|
533
|
-
|
|
534
|
-
Consider a small Toolbar pattern only after the shared focus behavior is clear.
|
|
535
|
-
|
|
536
|
-
Its value should come from semantics and interaction, not from duplicating `.cluster`. It is also not a reason to consolidate the focus primitive: `focus-group` is a documented public export with a real internal consumer in `menu`, so it does not need a second one to justify itself. Tabs in particular are not the missing consumer — they navigate *and* activate, sync `aria-selected`, toggle panels, and treat a valid panel as a candidacy requirement, so folding them in would trade little code for a subtle coupling between the focused item and the selected one. Wait for a third consumer to reveal the shared abstraction instead of designing it from two.
|
|
537
|
-
|
|
538
|
-
### Switch
|
|
539
|
-
|
|
540
|
-
Keep the checkbox-based implementation.
|
|
541
|
-
|
|
542
|
-
Track native switch semantics and adopt forward-compatible markup when it becomes appropriate for the browser contract.
|
|
543
|
-
|
|
544
|
-
### Menu
|
|
545
|
-
|
|
546
|
-
Keep menu styling, surface lifecycle, floating positioning, commands, and keyboard behavior decomposed.
|
|
547
|
-
|
|
548
|
-
Do not add a second menu architecture that mimics experimental elements.
|
|
549
|
-
|
|
550
|
-
### Tooltip
|
|
551
|
-
|
|
552
|
-
Continue treating Tooltip as progressive enhancement over native-shaped markup.
|
|
553
|
-
|
|
554
|
-
Interest invocation and hint popovers should eventually be able to replace parts of its JavaScript.
|
|
555
|
-
|
|
556
|
-
### Select and combobox
|
|
557
|
-
|
|
558
|
-
Keep native `<select>` as the core path.
|
|
559
|
-
|
|
560
|
-
Do not add a custom select or autocomplete widget merely to fill today's browser gaps.
|
|
561
|
-
|
|
562
|
-
### Collapse
|
|
563
|
-
|
|
564
|
-
Do not add a generic Collapse widget while native disclosure, popover, dialog, and possible future openable primitives cover or may cover the relevant use cases.
|
|
565
|
-
|
|
566
|
-
### Clickable cards
|
|
567
|
-
|
|
568
|
-
Do not add a stretched-link utility as a framework workaround.
|
|
569
|
-
|
|
570
|
-
Use explicit links until the platform provides a robust delegation mechanism.
|
|
571
|
-
|
|
572
|
-
## Review trigger
|
|
573
|
-
|
|
574
|
-
This note should be revisited when:
|
|
575
|
-
|
|
576
|
-
* Actual considers adding a complex interactive component;
|
|
577
|
-
* a relevant Open UI proposal graduates or materially changes direction;
|
|
578
|
-
* an HTML or CSS primitive becomes broadly available;
|
|
579
|
-
* browser support tiers are revised;
|
|
580
|
-
* several existing widgets duplicate the same interaction logic.
|
|
581
|
-
|
|
582
|
-
The useful question is not:
|
|
583
|
-
|
|
584
|
-
> "Can browsers do this natively yet?"
|
|
585
|
-
|
|
586
|
-
It is:
|
|
587
|
-
|
|
588
|
-
> "If browsers can do this natively in two years, will today's Actual design make that transition easy?"
|
|
589
|
-
|
|
590
|
-
## Goal
|
|
591
|
-
|
|
592
|
-
Actual should progressively become **less responsible for browser behavior**, not more.
|
|
593
|
-
|
|
594
|
-
CSS should provide the visual system.
|
|
595
|
-
|
|
596
|
-
Small primitives should bridge genuine platform gaps.
|
|
597
|
-
|
|
598
|
-
JavaScript enhancements should remain replaceable.
|
|
599
|
-
|
|
600
|
-
HTML should carry as much semantics and behavior as the platform can reasonably provide.
|
|
601
|
-
|
|
602
|
-
The ideal long-term outcome is that improvements to HTML and CSS allow Actual to delete implementation code while applications keep essentially the same markup and styling vocabulary.
|