actual-css 0.17.1 → 0.18.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 +39 -0
- package/README.md +7 -5
- package/components.json +20 -4
- package/dist/actual.full.css +219 -26
- package/dist/actual.full.min.css +1 -1
- package/docs/design-notes/tokens.md +2 -1
- package/docs/navigation.json +1 -0
- package/docs/pages/components/alert.md +8 -6
- package/docs/pages/components/button.md +26 -24
- package/docs/pages/components/list.md +117 -29
- package/docs/pages/components/timeline.md +130 -2
- package/docs/pages/examples/overview.md +2 -0
- package/docs/pages/foundations/theming.md +6 -4
- package/docs/pages/foundations/tokens.md +10 -9
- package/docs/pages/foundations/typography.md +5 -0
- package/docs/pages/guides/coding-agents.md +163 -0
- package/docs/pages/guides/introduction.md +1 -1
- package/docs/pages/guides/upgrading.md +1 -1
- package/docs/pages/layout/scroll-snap.md +26 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/reserved-classes.json +2 -0
- package/skills/actual-css/PROJECT.md.example +13 -2
- package/skills/actual-css/README.md +5 -0
- package/skills/actual-css/SKILL.md +13 -2
- package/src/css/components/alert.css +40 -3
- package/src/css/components/button.css +20 -2
- package/src/css/components/join.css +3 -10
- package/src/css/components/list.css +32 -0
- package/src/css/components/timeline.css +113 -10
- package/src/css/core/tokens.css +4 -1
- package/src/css/forms/choice.css +7 -0
- package/src/tooling/design-components.js +2 -2
|
@@ -85,7 +85,8 @@ The shared visual variants are:
|
|
|
85
85
|
|
|
86
86
|
- `.solid`: full background, paired foreground. This is the default for buttons.
|
|
87
87
|
- `.soft`: lightly tinted background, colored text. Good for alerts, badges, and secondary actions.
|
|
88
|
-
- `.outline`: transparent background, colored
|
|
88
|
+
- `.outline`: transparent background, colored text, and a text-colored border;
|
|
89
|
+
a neutral `.btn.outline` takes the `--border-control` edge instead.
|
|
89
90
|
- `.surface`: the page surface with the theme border, and the intent only in the text. The neutral chrome neither `.soft` (the intent-tinted treatment) nor `.outline` (no fill) can give.
|
|
90
91
|
|
|
91
92
|
Buttons also support two button-only variants:
|
package/docs/navigation.json
CHANGED
|
@@ -246,13 +246,13 @@ full-bleed notice.
|
|
|
246
246
|
|
|
247
247
|
## Admonition
|
|
248
248
|
|
|
249
|
-
An admonition is a structured box with a tinted title bar, an optional icon, and body content on the page surface — like the `!!! note` callouts in mkdocs. Use `.alert-title` for the header and `.alert-body` for the content. Intent classes tint the title bar background and the border; shared variants paint the title bar, so `.solid` fills it — and keeps the body's frame neutral — for a notification that needs to stand out.
|
|
249
|
+
An admonition is a structured box with a tinted title bar, an optional icon, and body content on the page surface — like the `!!! note` callouts in mkdocs. Use `.alert-title` for the header and `.alert-body` for the content. An icon in the title takes `.alert-icon`, so `--alert-icon-nudge` reaches it too. Intent classes tint the title bar background and the border; shared variants paint the title bar, so `.solid` fills it — and keeps the body's frame neutral — for a notification that needs to stand out.
|
|
250
250
|
|
|
251
251
|
```html demo
|
|
252
252
|
<div class="stack">
|
|
253
253
|
<div class="alert admonition">
|
|
254
254
|
<div class="alert-title">
|
|
255
|
-
<i class="ti ti-info-circle" aria-hidden="true"></i>
|
|
255
|
+
<i class="ti ti-info-circle alert-icon" aria-hidden="true"></i>
|
|
256
256
|
Note
|
|
257
257
|
</div>
|
|
258
258
|
<div class="alert-body">
|
|
@@ -262,7 +262,7 @@ An admonition is a structured box with a tinted title bar, an optional icon, and
|
|
|
262
262
|
|
|
263
263
|
<div class="alert warning admonition">
|
|
264
264
|
<div class="alert-title">
|
|
265
|
-
<i class="ti ti-alert-triangle" aria-hidden="true"></i>
|
|
265
|
+
<i class="ti ti-alert-triangle alert-icon" aria-hidden="true"></i>
|
|
266
266
|
Warning
|
|
267
267
|
</div>
|
|
268
268
|
<div class="alert-body">
|
|
@@ -272,7 +272,7 @@ An admonition is a structured box with a tinted title bar, an optional icon, and
|
|
|
272
272
|
|
|
273
273
|
<div class="alert success admonition solid">
|
|
274
274
|
<div class="alert-title">
|
|
275
|
-
<i class="ti ti-circle-check" aria-hidden="true"></i>
|
|
275
|
+
<i class="ti ti-circle-check alert-icon" aria-hidden="true"></i>
|
|
276
276
|
Saved
|
|
277
277
|
</div>
|
|
278
278
|
<div class="alert-body">
|
|
@@ -286,8 +286,10 @@ An admonition is a structured box with a tinted title bar, an optional icon, and
|
|
|
286
286
|
|
|
287
287
|
- `--alert-pad-inline` — inline padding. Stays stable across density contexts.
|
|
288
288
|
- `--alert-pad-block` — block padding.
|
|
289
|
-
- `--alert-font-size` — base font size.
|
|
290
|
-
- `--alert-
|
|
289
|
+
- `--alert-font-size` — base font size. Keep it in `rem` or `px`: the icon offset is a `calc()` evaluated on the icon, where an `em` would resolve against the icon's size.
|
|
290
|
+
- `--alert-line-height` — the alert's line box. The icon offset is derived from it, so change the rhythm here rather than with `line-height`.
|
|
291
|
+
- `--alert-icon-size` — size of a leading `.alert-icon`. Set it from the text (`calc(var(--alert-font-size) * 1.25)`) when the icon should scale with the type.
|
|
292
|
+
- `--alert-icon-nudge` — local correction to the icon's centring on the first line box, for an off-centre glyph or a theme tile larger than `--alert-icon-size`. An `em` here follows the icon size; the correction does not move the close button.
|
|
291
293
|
- `--close-size` / `--close-icon-size` — the alert declares compact values for its `.close`; set them on the alert to change them.
|
|
292
294
|
- `--alert-radius` — corner radius, when the default `--radius-lg` does not fit.
|
|
293
295
|
- `--alert-border-inline-start-color` / `--alert-border-inline-start-width` — extension points for a callout-style colored flag on the leading edge instead of a uniform border.
|
|
@@ -4,23 +4,23 @@ Actions and navigation with shared intents, variants, sizes, and loading, presse
|
|
|
4
4
|
|
|
5
5
|
## Class reference
|
|
6
6
|
|
|
7
|
-
| Class | Kind | Description
|
|
8
|
-
| ------------- | --------- |
|
|
9
|
-
| `.btn` | Component | Base button, solid by default.
|
|
10
|
-
| `.primary` | Intent | Primary action.
|
|
11
|
-
| `.secondary` | Intent | Secondary action.
|
|
12
|
-
| `.success` | Intent | Positive outcome.
|
|
13
|
-
| `.warning` | Intent | Caution.
|
|
14
|
-
| `.danger` | Intent | Destructive action.
|
|
15
|
-
| `.neutral` | Intent | Neutral tone (the `.btn` default).
|
|
16
|
-
| `.soft` | Variant | Muted intent-tinted surface.
|
|
17
|
-
| `.outline` | Variant | Transparent with an intent
|
|
18
|
-
| `.solid` | Variant | Filled intent background — the `.btn` default.
|
|
19
|
-
| `.surface` | Variant | Page surface, neutral border, intent on the label.
|
|
20
|
-
| `.ghost` | Variant | Borderless text button (button-only).
|
|
21
|
-
| `.link` | Variant | Underlined text button (button-only).
|
|
22
|
-
| `.sm` / `.lg` | Size | Compact or large control height.
|
|
23
|
-
| `.icon-only` | Variant | Square icon button sized to the control height.
|
|
7
|
+
| Class | Kind | Description |
|
|
8
|
+
| ------------- | --------- | ------------------------------------------------------- |
|
|
9
|
+
| `.btn` | Component | Base button, solid by default. |
|
|
10
|
+
| `.primary` | Intent | Primary action. |
|
|
11
|
+
| `.secondary` | Intent | Secondary action. |
|
|
12
|
+
| `.success` | Intent | Positive outcome. |
|
|
13
|
+
| `.warning` | Intent | Caution. |
|
|
14
|
+
| `.danger` | Intent | Destructive action. |
|
|
15
|
+
| `.neutral` | Intent | Neutral tone (the `.btn` default). |
|
|
16
|
+
| `.soft` | Variant | Muted intent-tinted surface. |
|
|
17
|
+
| `.outline` | Variant | Transparent with a control edge; an intent recolors it. |
|
|
18
|
+
| `.solid` | Variant | Filled intent background — the `.btn` default. |
|
|
19
|
+
| `.surface` | Variant | Page surface, neutral border, intent on the label. |
|
|
20
|
+
| `.ghost` | Variant | Borderless text button (button-only). |
|
|
21
|
+
| `.link` | Variant | Underlined text button (button-only). |
|
|
22
|
+
| `.sm` / `.lg` | Size | Compact or large control height. |
|
|
23
|
+
| `.icon-only` | Variant | Square icon button sized to the control height. |
|
|
24
24
|
|
|
25
25
|
## Basic usage
|
|
26
26
|
|
|
@@ -75,13 +75,15 @@ component with shared variants reads, so the same declaration works on a badge:
|
|
|
75
75
|
The rule ties with the variant's own `--ui-bg` on specificity, so load it after
|
|
76
76
|
Actual CSS or import `actual.layer.css`.
|
|
77
77
|
|
|
78
|
-
Transparent treatments (`.outline`, `.ghost`, `.link`)
|
|
79
|
-
foreground by default, including on a band your application paints.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
Transparent treatments (`.outline`, `.ghost`, `.link`) take their text from the
|
|
79
|
+
surrounding foreground by default, including on a band your application paints.
|
|
80
|
+
A neutral outline draws its border with `--border-control`, the theme's control
|
|
81
|
+
edge, so it matches an adjacent field rather than the band ink; set
|
|
82
|
+
`--ui-border` when the border must follow the band. A local intent class still
|
|
83
|
+
wins: `.danger.outline` uses the danger color in any context, and nothing tunes
|
|
84
|
+
that color for a surface you paint yourself. For intent ink on a dark band, use
|
|
85
|
+
a `data-theme` island, whose palette is tuned for its surface. Filled buttons
|
|
86
|
+
own their surface and keep their normal intent recipe.
|
|
85
87
|
|
|
86
88
|
A dark button (inverse, contrast) is a custom intent on the button itself, so
|
|
87
89
|
every variant keeps working — `.outline` and `.ghost` take the solid ink:
|
|
@@ -7,27 +7,55 @@ and trailing metadata or controls. Use `.media` for a single two-part
|
|
|
7
7
|
media/content relationship, `.nav-list` for navigation structure, and native
|
|
8
8
|
list markers when order or bullets carry meaning.
|
|
9
9
|
|
|
10
|
+
A bare `.list` is intentionally surface-less: it draws the leading and
|
|
11
|
+
inter-row dividers and lets a card, drawer, or page section own the background.
|
|
12
|
+
Add `.grouped` when the rows stand on their own.
|
|
13
|
+
|
|
14
|
+
## Grouped
|
|
15
|
+
|
|
16
|
+
`.list.grouped` paints the raised surface, border, and rounded shell, adds the
|
|
17
|
+
inline gutter a standalone list needs, and rounds the first and last rows so a
|
|
18
|
+
hover or current fill stays inside the shell. Keep the bare `.list` when an
|
|
19
|
+
existing surface already frames the rows.
|
|
20
|
+
|
|
10
21
|
```html demo
|
|
11
|
-
<ul class="list">
|
|
22
|
+
<ul class="list grouped" style="max-inline-size: 34rem">
|
|
23
|
+
<li class="list-item">
|
|
24
|
+
<i class="ti ti-device-laptop muted" aria-hidden="true"></i>
|
|
25
|
+
<span class="list-item-content">
|
|
26
|
+
<strong class="list-item-title">Work laptop · Firefox</strong>
|
|
27
|
+
<span class="list-item-text">Brussels, BE · 12 minutes ago</span>
|
|
28
|
+
</span>
|
|
29
|
+
<span class="badge success">Current session</span>
|
|
30
|
+
</li>
|
|
12
31
|
<li class="list-item">
|
|
13
|
-
<
|
|
32
|
+
<i class="ti ti-device-mobile muted" aria-hidden="true"></i>
|
|
14
33
|
<span class="list-item-content">
|
|
15
|
-
<strong class="list-item-title">
|
|
16
|
-
<span class="list-item-text">
|
|
34
|
+
<strong class="list-item-title">Phone · Safari</strong>
|
|
35
|
+
<span class="list-item-text">Ghent, BE · 3 hours ago</span>
|
|
17
36
|
</span>
|
|
18
|
-
<
|
|
37
|
+
<button class="btn surface sm"
|
|
38
|
+
type="button"
|
|
39
|
+
style="--btn-radius: var(--radius-full)">End session</button>
|
|
19
40
|
</li>
|
|
20
41
|
<li class="list-item">
|
|
21
|
-
<
|
|
42
|
+
<i class="ti ti-device-tablet muted" aria-hidden="true"></i>
|
|
22
43
|
<span class="list-item-content">
|
|
23
|
-
<strong class="list-item-title">
|
|
24
|
-
<span class="list-item-text">
|
|
44
|
+
<strong class="list-item-title">Tablet · Safari</strong>
|
|
45
|
+
<span class="list-item-text">Antwerp, BE · yesterday</span>
|
|
25
46
|
</span>
|
|
26
|
-
<
|
|
47
|
+
<button class="btn surface sm"
|
|
48
|
+
type="button"
|
|
49
|
+
style="--btn-radius: var(--radius-full)">End session</button>
|
|
27
50
|
</li>
|
|
28
51
|
</ul>
|
|
29
52
|
```
|
|
30
53
|
|
|
54
|
+
The end-session actions are `.btn surface sm` with
|
|
55
|
+
`--btn-radius: var(--radius-full)`: a neutral pill with the theme's muted border
|
|
56
|
+
and the normal text color, rather than `.outline`'s transparent fill and control
|
|
57
|
+
edge.
|
|
58
|
+
|
|
31
59
|
Leading and trailing content are unconstrained: avatars, native choices,
|
|
32
60
|
badges, text, switches, and buttons retain their own component sizing. In a
|
|
33
61
|
narrow row, the trailing region moves under the content rather than breaking a
|
|
@@ -42,13 +70,8 @@ gap: `.list-item-content` always takes the row's free space and
|
|
|
42
70
|
leading region or not. A settings row — a label, a description, and one
|
|
43
71
|
control on the end edge — is the two-region form.
|
|
44
72
|
|
|
45
|
-
Regions center on the row. When supporting text runs to three lines or more,
|
|
46
|
-
add `.items-start` to the row, or to the `.list` for every row, so the leading
|
|
47
|
-
avatar and the trailing control stay on the title line instead of floating
|
|
48
|
-
mid-paragraph (top-align, align to first line).
|
|
49
|
-
|
|
50
73
|
```html demo
|
|
51
|
-
<ul class="list">
|
|
74
|
+
<ul class="list grouped" style="max-inline-size: 34rem">
|
|
52
75
|
<li class="list-item">
|
|
53
76
|
<label class="list-item-content" for="row-memory">
|
|
54
77
|
<span class="list-item-title">Memory</span>
|
|
@@ -71,16 +94,79 @@ mid-paragraph (top-align, align to first line).
|
|
|
71
94
|
</ul>
|
|
72
95
|
```
|
|
73
96
|
|
|
97
|
+
Regions center on the row. When supporting text runs to three lines or more,
|
|
98
|
+
add `.items-start` to the row, or to the `.list` for every row, so the leading
|
|
99
|
+
avatar and the trailing control stay on the title line instead of floating
|
|
100
|
+
mid-paragraph (top-align, align to first line).
|
|
101
|
+
|
|
102
|
+
## Row actions
|
|
103
|
+
|
|
104
|
+
Do not attach click JavaScript to the entire row. Use a link for navigation and
|
|
105
|
+
a button or native control for actions. Put row actions in the trailing region:
|
|
106
|
+
a single control, or a `.flyout-trigger` around a `⋯` button when the row has
|
|
107
|
+
several. The trigger stays a normal button and the menu keeps the
|
|
108
|
+
`.menu > li > .menu-item` anatomy; [Flyout](../enhancements/flyout.md) owns the
|
|
109
|
+
wiring.
|
|
110
|
+
|
|
111
|
+
```html demo
|
|
112
|
+
<ul class="list grouped" style="max-inline-size: 34rem">
|
|
113
|
+
<li class="list-item">
|
|
114
|
+
<span class="avatar sm"><abbr>NL</abbr></span>
|
|
115
|
+
<span class="list-item-content">
|
|
116
|
+
<strong class="list-item-title">Nadia Laurent</strong>
|
|
117
|
+
<span class="list-item-text">nadia@example.com</span>
|
|
118
|
+
</span>
|
|
119
|
+
<div class="list-item-trailing cluster">
|
|
120
|
+
<span class="badge soft primary">Owner</span>
|
|
121
|
+
<div class="flyout-trigger">
|
|
122
|
+
<button class="btn ghost sm"
|
|
123
|
+
type="button"
|
|
124
|
+
data-enhance="flyout"
|
|
125
|
+
aria-expanded="false"
|
|
126
|
+
aria-controls="member-actions"
|
|
127
|
+
aria-label="Actions for Nadia Laurent">
|
|
128
|
+
<i class="ti ti-dots" aria-hidden="true"></i>
|
|
129
|
+
</button>
|
|
130
|
+
<menu class="flyout sm menu" id="member-actions" hidden>
|
|
131
|
+
<li><button class="menu-item" type="button">Manage access</button></li>
|
|
132
|
+
<li><button class="menu-item" type="button">Copy invite link</button></li>
|
|
133
|
+
<hr class="menu-separator">
|
|
134
|
+
<li><button class="menu-item danger" type="button">Remove member</button></li>
|
|
135
|
+
</menu>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</li>
|
|
139
|
+
<li class="list-item">
|
|
140
|
+
<span class="avatar sm"><abbr>TR</abbr></span>
|
|
141
|
+
<span class="list-item-content">
|
|
142
|
+
<strong class="list-item-title">Tomás Rivera</strong>
|
|
143
|
+
<span class="list-item-text">tomas@example.com</span>
|
|
144
|
+
</span>
|
|
145
|
+
<span class="badge">Editor</span>
|
|
146
|
+
</li>
|
|
147
|
+
<li class="list-item">
|
|
148
|
+
<span class="avatar sm"><abbr>IO</abbr></span>
|
|
149
|
+
<span class="list-item-content">
|
|
150
|
+
<strong class="list-item-title">Ines Okafor</strong>
|
|
151
|
+
<span class="list-item-text">ines@example.com</span>
|
|
152
|
+
</span>
|
|
153
|
+
<span class="badge">Viewer</span>
|
|
154
|
+
</li>
|
|
155
|
+
</ul>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Navigation
|
|
159
|
+
|
|
74
160
|
For a navigable row, keep the list semantics and put `.list-item` on the link:
|
|
75
161
|
|
|
76
162
|
```html demo
|
|
77
|
-
<ul class="list">
|
|
163
|
+
<ul class="list grouped" style="max-inline-size: 34rem">
|
|
78
164
|
<li>
|
|
79
|
-
<a class="list-item" href="#
|
|
80
|
-
<span class="avatar sm" aria-hidden="true"><i class="ti ti-
|
|
165
|
+
<a class="list-item" href="#notifications">
|
|
166
|
+
<span class="avatar sm" aria-hidden="true"><i class="ti ti-bell" aria-hidden="true"></i></span>
|
|
81
167
|
<span class="list-item-content">
|
|
82
|
-
<strong class="list-item-title">
|
|
83
|
-
<span class="list-item-text">
|
|
168
|
+
<strong class="list-item-title">Notifications</strong>
|
|
169
|
+
<span class="list-item-text">Email, push, and digest settings</span>
|
|
84
170
|
</span>
|
|
85
171
|
<i class="ti ti-chevron-right list-item-trailing" aria-hidden="true"></i>
|
|
86
172
|
</a>
|
|
@@ -88,21 +174,23 @@ For a navigable row, keep the list semantics and put `.list-item` on the link:
|
|
|
88
174
|
</ul>
|
|
89
175
|
```
|
|
90
176
|
|
|
91
|
-
Do not attach click JavaScript to the entire row. Use a link for navigation and
|
|
92
|
-
a button or native control for actions.
|
|
93
|
-
|
|
94
177
|
Mark the current row on its link with `aria-current="page"` when the row opens
|
|
95
178
|
a page, or `aria-current="true"` when it is the current item of a master/detail
|
|
96
179
|
view (a conversation, a thread, a record) that is not a page of its own. Any
|
|
97
|
-
other value is inert. The [Workspaces example](../examples/overview.md)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
180
|
+
other value is inert. The [Workspaces example](../examples/overview.md) shows a
|
|
181
|
+
current row with trailing actions and a flyout. Navigable rows usually want a
|
|
182
|
+
non-zero `--list-item-pad-inline`: without that gutter, the current indicator
|
|
183
|
+
touches the leading region and the trailing touches the row edge. `.grouped`
|
|
184
|
+
sets that gutter already.
|
|
101
185
|
|
|
102
186
|
## Hooks
|
|
103
187
|
|
|
104
188
|
- `--list-item-min-size` controls the row's minimum touch height.
|
|
105
189
|
- `--list-item-pad-block` and `--list-item-pad-inline` control row padding.
|
|
190
|
+
`.grouped` raises the inline padding to a standalone surface's gutter; set
|
|
191
|
+
the hook on the list to choose another.
|
|
106
192
|
- `--list-item-gap` controls spacing between the regions a row actually has.
|
|
107
|
-
- `--list-divider` controls the
|
|
108
|
-
|
|
193
|
+
- `--list-divider` controls the inter-row dividers, and the leading divider on
|
|
194
|
+
a bare list. `.grouped` replaces that leading divider with its shell border.
|
|
195
|
+
The final row deliberately has no trailing divider.
|
|
196
|
+
- `--list-radius` controls the corner radius of the `.grouped` shell.
|
|
@@ -38,7 +38,7 @@ the version beside the rail, see the
|
|
|
38
38
|
</ol>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
The dot
|
|
41
|
+
The dot centres on the first line box of the event, whether it opens with the
|
|
42
42
|
`<time>` or with text. Block children drop their margins; wrap the content in
|
|
43
43
|
a [`.stack`](../layout/stack.md) when an event needs more spacing.
|
|
44
44
|
|
|
@@ -69,7 +69,13 @@ The color is decoration: write the state in the text too.
|
|
|
69
69
|
|
|
70
70
|
An [`.avatar`](avatar.md) or an `aria-hidden` icon written first in the `<li>`
|
|
71
71
|
replaces the dot. One such event widens the rail for the whole list, so dots
|
|
72
|
-
and slots stay aligned. An icon sits in a disc
|
|
72
|
+
and slots stay aligned. An icon sits in a disc; the event's intent tints it
|
|
73
|
+
like a soft badge.
|
|
74
|
+
|
|
75
|
+
Dots, discs and avatars share the same alignment with the first line box.
|
|
76
|
+
For an off-centre icon, wrap the glyph in an `aria-hidden` slot and apply a
|
|
77
|
+
local `translate` to the inner glyph. Keep the disc in place:
|
|
78
|
+
`--timeline-marker-nudge` moves the whole marker and its rail geometry.
|
|
73
79
|
|
|
74
80
|
```html demo
|
|
75
81
|
<ol class="timeline">
|
|
@@ -90,6 +96,125 @@ and slots stay aligned. An icon sits in a disc colored by the event's intent.
|
|
|
90
96
|
</ol>
|
|
91
97
|
```
|
|
92
98
|
|
|
99
|
+
## Dates at the end
|
|
100
|
+
|
|
101
|
+
`.timeline-dates-end` moves each `<time>` to the end of the event's first
|
|
102
|
+
line, so the titles lead and the dates line up in a column on the right.
|
|
103
|
+
Write the `<time>` first in the event, as usual.
|
|
104
|
+
|
|
105
|
+
It suits a narrow container: a sidebar, a card, a side panel. In a wide
|
|
106
|
+
column the dates drift away from their titles; cap the list's width or keep
|
|
107
|
+
the default dateline.
|
|
108
|
+
|
|
109
|
+
```html demo
|
|
110
|
+
<section class="card" style="--card-max-inline-size: 28rem">
|
|
111
|
+
<ol class="timeline timeline-dates-end">
|
|
112
|
+
<li class="success">
|
|
113
|
+
<i class="ti ti-check" aria-hidden="true"></i>
|
|
114
|
+
<time datetime="2026-11-11T09:40">09:40</time>
|
|
115
|
+
<strong>Results available</strong>
|
|
116
|
+
<p class="muted">Reviewed by the attending physician.</p>
|
|
117
|
+
</li>
|
|
118
|
+
<li class="primary">
|
|
119
|
+
<i class="ti ti-flask" aria-hidden="true"></i>
|
|
120
|
+
<time datetime="2026-11-11T08:15">08:15</time>
|
|
121
|
+
<strong>Sample sent to the lab</strong>
|
|
122
|
+
</li>
|
|
123
|
+
<li>
|
|
124
|
+
<i class="ti ti-message" aria-hidden="true"></i>
|
|
125
|
+
<time datetime="2026-11-10">Yesterday</time>
|
|
126
|
+
<strong>Patient asked a question</strong>
|
|
127
|
+
<p class="muted">Should I fast before the blood test?</p>
|
|
128
|
+
</li>
|
|
129
|
+
<li>
|
|
130
|
+
<i class="ti ti-calendar-plus" aria-hidden="true"></i>
|
|
131
|
+
<time datetime="2026-11-03">Nov 3</time>
|
|
132
|
+
<strong>Appointment booked</strong>
|
|
133
|
+
</li>
|
|
134
|
+
</ol>
|
|
135
|
+
</section>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### In progress
|
|
139
|
+
|
|
140
|
+
For an event still running (an import, a sync, an upload), put a
|
|
141
|
+
[`.spinner`](spinner.md) inside the icon slot. The disc stays still and the
|
|
142
|
+
spinner takes the event's intent. A bare `.spinner` as the slot would lose its
|
|
143
|
+
own border to the disc's. Say the state in the text, since the slot is hidden
|
|
144
|
+
from assistive technology.
|
|
145
|
+
|
|
146
|
+
```html demo
|
|
147
|
+
<section class="card" style="--card-max-inline-size: 28rem">
|
|
148
|
+
<ol class="timeline timeline-dates-end">
|
|
149
|
+
<li class="warning">
|
|
150
|
+
<span aria-hidden="true"><span class="spinner"></span></span>
|
|
151
|
+
<time datetime="2026-11-11T10:00">Just now</time>
|
|
152
|
+
<strong>Importing</strong> <code>batch-118</code>
|
|
153
|
+
<p class="muted">Patient records from the March export</p>
|
|
154
|
+
</li>
|
|
155
|
+
<li class="success">
|
|
156
|
+
<i class="ti ti-check" aria-hidden="true"></i>
|
|
157
|
+
<time datetime="2026-11-11T09:40">20 min ago</time>
|
|
158
|
+
<strong>Imported</strong> <code>batch-117</code>
|
|
159
|
+
<p class="muted">Invoices for the second quarter</p>
|
|
160
|
+
</li>
|
|
161
|
+
<li class="danger">
|
|
162
|
+
<i class="ti ti-x" aria-hidden="true"></i>
|
|
163
|
+
<time datetime="2026-11-11T08:00">2 h ago</time>
|
|
164
|
+
<strong>Failed</strong> <code>batch-116</code>
|
|
165
|
+
<p class="muted">Lab results, 3 files · <a href="#">Open the error report</a></p>
|
|
166
|
+
</li>
|
|
167
|
+
</ol>
|
|
168
|
+
</section>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Activity feed
|
|
172
|
+
|
|
173
|
+
Avatars as markers, the actor and verb as one sentence, and richer content
|
|
174
|
+
below: a [`.chat-bubble`](chat.md) for a comment, a [`.badge`](badge.md) for
|
|
175
|
+
a status, a [`.btn`](button.md) for a file. A [`.stack`](../layout/stack.md)
|
|
176
|
+
spaces the sentence from what follows; the `<time>` stays a direct child of
|
|
177
|
+
the `<li>`.
|
|
178
|
+
|
|
179
|
+
```html demo
|
|
180
|
+
<section class="card" style="--card-max-inline-size: 28rem">
|
|
181
|
+
<ol class="timeline timeline-dates-end">
|
|
182
|
+
<li>
|
|
183
|
+
<span class="avatar primary"><abbr>NK</abbr></span>
|
|
184
|
+
<time datetime="2026-11-11T09:55">5 min ago</time>
|
|
185
|
+
<div class="stack">
|
|
186
|
+
<p><a href="#">Noah Keller</a> <span class="muted">commented</span></p>
|
|
187
|
+
<p class="chat-bubble">Could we move the follow-up to Thursday morning?</p>
|
|
188
|
+
</div>
|
|
189
|
+
</li>
|
|
190
|
+
<li>
|
|
191
|
+
<span class="avatar"><abbr>IR</abbr></span>
|
|
192
|
+
<time datetime="2026-11-11T09:20">40 min ago</time>
|
|
193
|
+
<a href="#">Inès Roy</a> <span class="muted">set the status to</span>
|
|
194
|
+
<span class="badge soft primary">Confirmed</span>
|
|
195
|
+
</li>
|
|
196
|
+
<li>
|
|
197
|
+
<span class="avatar"><abbr>TB</abbr></span>
|
|
198
|
+
<time datetime="2026-11-11T08:00">2 h ago</time>
|
|
199
|
+
<div class="stack">
|
|
200
|
+
<p><a href="#">Tom Becker</a> <span class="muted">attached a file</span></p>
|
|
201
|
+
<p>
|
|
202
|
+
<a class="btn surface sm" href="#">
|
|
203
|
+
<i class="ti ti-file" aria-hidden="true"></i>
|
|
204
|
+
intake-form.pdf <span class="muted">180 KB</span>
|
|
205
|
+
</a>
|
|
206
|
+
</p>
|
|
207
|
+
</div>
|
|
208
|
+
</li>
|
|
209
|
+
<li>
|
|
210
|
+
<span class="avatar"><abbr>CL</abbr></span>
|
|
211
|
+
<time datetime="2026-11-09">Monday</time>
|
|
212
|
+
<a href="#">Chloé Laurent</a> <span class="muted">opened the case</span>
|
|
213
|
+
</li>
|
|
214
|
+
</ol>
|
|
215
|
+
</section>
|
|
216
|
+
```
|
|
217
|
+
|
|
93
218
|
## Density
|
|
94
219
|
|
|
95
220
|
The gap between events follows the density context: `.compact` and
|
|
@@ -108,6 +233,9 @@ The gap between events follows the density context: `.compact` and
|
|
|
108
233
|
- `--timeline-dot-size` — dot diameter.
|
|
109
234
|
- `--timeline-slot-size` — avatar and icon diameter; the rail takes this width
|
|
110
235
|
as soon as one event has a slot.
|
|
236
|
+
- `--timeline-glyph-size` — icon and spinner size in a slot; half the slot.
|
|
111
237
|
- `--timeline-gap` — space between events; follows `--density-space`.
|
|
112
238
|
- `--timeline-inline-gap` — space between the rail and the content.
|
|
113
239
|
- `--timeline-line-size` — rail line thickness.
|
|
240
|
+
- `--timeline-marker-nudge` — correction to the whole marker's centring on the
|
|
241
|
+
first line box; an `em` resolves against the event's text size.
|
|
@@ -49,6 +49,7 @@ One mechanism at a time, with its contract and its pitfalls.
|
|
|
49
49
|
- [Grid density](../../demo/templates/grid.html) - the grid contracts on resizable stages, with the pitfalls called out
|
|
50
50
|
- [Column layout](../../demo/templates/column-layout.html) - the twelve-column canvas: spans, starts, and the narrow-container recomposition the framework leaves to the application
|
|
51
51
|
- [Density](../../demo/templates/density.html) - compact control density
|
|
52
|
+
- [Alert icon alignment](../../demo/templates/alerts.html) - the leading icon against the first line box: icon sources, icon sets, text fonts, text sizes, line heights, icon sizes, message shapes, variants and the neo-brutalist tile, with optional box guides
|
|
52
53
|
|
|
53
54
|
### System benches
|
|
54
55
|
|
|
@@ -62,6 +63,7 @@ extension points.
|
|
|
62
63
|
- [Select intents](../../demo/templates/select-intents.html) - extending the enhancer with a project's own `data-enhance` behavior, injected markup included, with no framework change
|
|
63
64
|
- [Popover transport probe](../../demo/templates/popover-transport.html) - self-scoring bench for the native popover transport go/no-go
|
|
64
65
|
- [Card rail](../../demo/templates/card-rail.html) - one list as a 3-column grid in a wide container and a scroll-snap rail with a peek and CSS scroll markers in a narrow one
|
|
66
|
+
- [Carousel](../../demo/templates/carousel.html) - a hero carousel from one scroll-snap list: full-width slides, native scroll buttons for previous and next, and scroll markers as dots, with a swipe fallback
|
|
65
67
|
- [Playful FAQ](../../demo/templates/playful-faq.html) - the separated accordion with an application palette, a pill plus/close marker and an animated open/close through `::details-content`, no JavaScript
|
|
66
68
|
- [Tooltips](../../demo/templates/tooltips.html) - generated text is a snapshot at show time: what updates, what stays, and the explicit-tip way for dynamic content
|
|
67
69
|
|
|
@@ -153,10 +153,12 @@ application CSS and keep forms and intent ink out of it:
|
|
|
153
153
|
}
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
Transparent
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
Transparent inks (`.btn.outline`, `.ghost`, `.link`) and headings follow that
|
|
157
|
+
ink; a neutral `.btn.outline` draws its border with `--border-control`, so the
|
|
158
|
+
edge stays visible without being derived from the band. Fields, their labels
|
|
159
|
+
and help text, and intent colors keep the page palette, which nothing tunes for
|
|
160
|
+
`--surface-solid`. Focus lines stay readable there: the theme contract keeps
|
|
161
|
+
`--focus` at 3:1 on `--surface-solid`.
|
|
160
162
|
|
|
161
163
|
→ Foundations · Tokens (theme contract) · Examples · Contrast contexts
|
|
162
164
|
|
|
@@ -128,14 +128,15 @@ A theme with translucent surfaces overrides both with opaque values.
|
|
|
128
128
|
|
|
129
129
|
`--border` separates surfaces: cards, tables, dividers, panels. `--border-control`
|
|
130
130
|
is the resting edge that tells a control apart from the surface — fields,
|
|
131
|
-
checkboxes and radios, switches, OTP cells, choice cards, join addons,
|
|
132
|
-
and file inputs. It is derived from `--text` and
|
|
133
|
-
palette it holds 3:1 against the surface, and
|
|
134
|
-
for your theme. `--border-control-mix` sets
|
|
135
|
-
tinted surface pulls the edge under 3:1. Without
|
|
136
|
-
`--border`. Set `--border-control` itself to
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
checkboxes and radios, switches, OTP cells, choice cards, join addons, neutral
|
|
132
|
+
outline buttons, the color and file inputs. It is derived from `--text` and
|
|
133
|
+
`--surface`; on the default palette it holds 3:1 against the surface, and
|
|
134
|
+
`actual-css contrast` reports it for your theme. `--border-control-mix` sets
|
|
135
|
+
the ink share; raise it when a tinted surface pulls the edge under 3:1. Without
|
|
136
|
+
`color-mix()` it falls back to `--border`. Set `--border-control` itself to
|
|
137
|
+
soften or strengthen controls (input border, field outline, form control
|
|
138
|
+
contrast) without touching any separator. Hover, checked, invalid and disabled
|
|
139
|
+
states keep their own colors.
|
|
139
140
|
|
|
140
141
|
Use `*-fg` pairs only for solid backgrounds where the component controls both foreground and background. Do not require a foreground token for every surface token.
|
|
141
142
|
|
|
@@ -294,7 +295,7 @@ Typography tokens cover the document baseline and common component needs.
|
|
|
294
295
|
|
|
295
296
|
```css
|
|
296
297
|
:root {
|
|
297
|
-
--font-sans: system-ui,
|
|
298
|
+
--font-sans: system-ui, sans-serif;
|
|
298
299
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
299
300
|
--font-width: 100%;
|
|
300
301
|
|
|
@@ -116,6 +116,11 @@ the document) and `--font-mono` (for `code` / `kbd` / `samp` / `pre`). There is
|
|
|
116
116
|
theme-level token in your own theme when a project actually needs one; the
|
|
117
117
|
baseline stays sans so app UI inherits predictably.
|
|
118
118
|
|
|
119
|
+
Both resolve to the platform's own faces, never a download, so two machines on
|
|
120
|
+
the same OS render alike and the package ships no font bytes. Override the slot
|
|
121
|
+
to opt into a webfont; this documentation site does it to load Inter for its own
|
|
122
|
+
pages.
|
|
123
|
+
|
|
119
124
|
### Font width
|
|
120
125
|
|
|
121
126
|
`--font-width` sets the document's `font-stretch`: a theme whose typeface has a
|