actual-css 0.14.1 → 0.15.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/CHANGELOG.md +48 -0
- package/README.md +4 -4
- package/components.json +51 -6
- package/dist/actual.full.css +380 -32
- package/dist/actual.full.js +1 -1
- package/dist/actual.full.min.css +1 -1
- package/docs/design-notes/architecture.md +3 -0
- package/docs/design-notes/enhancement-contract.md +14 -0
- package/docs/design-notes/naming.md +6 -0
- package/docs/design-notes/steps.md +13 -2
- package/docs/design-notes/tokens.md +159 -0
- package/docs/navigation.json +4 -1
- package/docs/pages/components/accordion.md +15 -18
- package/docs/pages/components/avatar.md +1 -0
- package/docs/pages/components/badge.md +41 -5
- package/docs/pages/components/button.md +32 -7
- package/docs/pages/components/card.md +40 -7
- package/docs/pages/components/diagrams.md +96 -0
- package/docs/pages/components/steps.md +31 -17
- package/docs/pages/components/table.md +4 -0
- package/docs/pages/components/timeline.md +111 -0
- package/docs/pages/enhancements/overview.md +13 -20
- package/docs/pages/enhancements/status-bar.md +7 -9
- package/docs/pages/enhancements/tabs.md +59 -21
- package/docs/pages/enhancements/tooltip.md +10 -19
- package/docs/pages/examples/overview.md +3 -0
- package/docs/pages/forms/choice-cards.md +3 -0
- package/docs/pages/forms/combobox.md +34 -19
- package/docs/pages/forms/controls.md +2 -0
- package/docs/pages/forms/date-picker.md +34 -13
- package/docs/pages/forms/file-upload.md +120 -0
- package/docs/pages/forms/joined-controls.md +4 -2
- package/docs/pages/forms/overview.md +8 -0
- package/docs/pages/foundations/philosophy.md +32 -62
- package/docs/pages/foundations/theming.md +63 -26
- package/docs/pages/foundations/tokens.md +91 -159
- package/docs/pages/foundations/typography.md +3 -0
- package/docs/pages/guides/integrating-actual-css.md +1 -1
- package/docs/pages/guides/introduction.md +14 -14
- package/docs/pages/guides/modular-import.md +124 -0
- package/docs/pages/guides/upgrading.md +63 -0
- package/docs/pages/layout/choosing.md +10 -16
- package/docs/pages/layout/grid.md +8 -16
- package/docs/pages/patterns/intent-nesting.md +13 -1
- package/package.json +2 -2
- package/reserved-classes.json +3 -0
- package/src/css/components/accordion.css +7 -3
- package/src/css/components/alert.css +9 -1
- package/src/css/components/app-nav.css +2 -0
- package/src/css/components/badge.css +38 -11
- package/src/css/components/button.css +10 -2
- package/src/css/components/card.css +9 -0
- package/src/css/components/index.css +1 -0
- package/src/css/components/skeleton.css +11 -0
- package/src/css/components/tab.css +77 -0
- package/src/css/components/table.css +7 -1
- package/src/css/components/timeline.css +160 -0
- package/src/css/core/base.css +13 -2
- package/src/css/core/reset.css +5 -0
- package/src/css/core/theme.css +6 -1
- package/src/css/core/tokens.css +3 -3
- package/src/css/forms/choice-card.css +5 -2
- package/src/css/forms/control.css +12 -3
- package/src/css/forms/custom-select.css +1 -1
- package/src/css/typography/prose.css +4 -2
- package/src/tooling/design-tokens.js +2 -0
- package/src/tooling/theme-contrast.js +1 -1
|
@@ -7,6 +7,69 @@ sections in order when skipping a release.
|
|
|
7
7
|
|
|
8
8
|
**Related terms:** migration, breaking changes, update, version.
|
|
9
9
|
|
|
10
|
+
## 0.14 to 0.15
|
|
11
|
+
|
|
12
|
+
No class or hook is removed: markup and application CSS keep working.
|
|
13
|
+
|
|
14
|
+
### Rendering changes without an edit
|
|
15
|
+
|
|
16
|
+
- `.badge > .close` is a disc inside the pill instead of overhanging its end;
|
|
17
|
+
a transparent hit area keeps the 24px target. Check CSS that overrides it or
|
|
18
|
+
sets `--close-size` on a badge.
|
|
19
|
+
- `.card.solid` links take the card's text color at rest, hover and focus,
|
|
20
|
+
even when a theme sets `--link`.
|
|
21
|
+
- `.skeleton` tracks and highlights are translucent ink tints.
|
|
22
|
+
- A selected `.choice-card.chip` paints its check with `--state-selected-text`
|
|
23
|
+
even when it carries an intent class.
|
|
24
|
+
- The `bootstrap-v6` demo theme is gone. Demo themes are not part of the
|
|
25
|
+
package, so this only affects a copy of it: keep the copy, or drop it since
|
|
26
|
+
the core focus line and fields now match it.
|
|
27
|
+
- The combobox, date picker and data grid recipes target
|
|
28
|
+
`@lekoala/combobox` 0.7.1, `@lekoala/date-picker` 0.5.1 and
|
|
29
|
+
`data-grid-component` 3.7.0. Compare a copied bridge with the current one in
|
|
30
|
+
[Combobox](../forms/combobox.md) and [Date picker](../forms/date-picker.md).
|
|
31
|
+
|
|
32
|
+
## 0.13 to 0.14
|
|
33
|
+
|
|
34
|
+
### Soft border mix
|
|
35
|
+
|
|
36
|
+
`--soft-border-mix` has no default. Search application CSS for
|
|
37
|
+
`var(--soft-border-mix)` without a fallback and give it the one its treatment
|
|
38
|
+
needs: `var(--soft-border-mix, 100%)` beside the translucent soft tint,
|
|
39
|
+
`var(--soft-border-mix, 65%)` beside the opaque `.soft` mix. A theme that sets the property still drives both treatments.
|
|
40
|
+
|
|
41
|
+
### Selected ink in themes
|
|
42
|
+
|
|
43
|
+
`--state-selected-text` colors selected ink on a regular surface (current
|
|
44
|
+
`.nav-link`, selected `.tab`, current step) and falls back to
|
|
45
|
+
`--state-selected`. A theme whose primary is too light to read as text sets it
|
|
46
|
+
to a darker ink; `actual-css contrast` reports the pair.
|
|
47
|
+
|
|
48
|
+
### Placement values
|
|
49
|
+
|
|
50
|
+
An unknown `data-tooltip-placement` or `data-flyout-placement` value logs a
|
|
51
|
+
console warning and falls back to the default placement. Replace the values
|
|
52
|
+
the console names.
|
|
53
|
+
|
|
54
|
+
### Building from a clone
|
|
55
|
+
|
|
56
|
+
`dist/`, `site/` and `demo/assets/` are no longer committed: run
|
|
57
|
+
`bun run build:all` after cloning. npm and GitHub release downloads are
|
|
58
|
+
unaffected.
|
|
59
|
+
|
|
60
|
+
### Rendering changes without an edit
|
|
61
|
+
|
|
62
|
+
- `.badge`, `.alert` and `.btn.soft` paint a translucent intent tint with no
|
|
63
|
+
rim; the shared `.soft` on `.card`, `.navbar`, `.app-nav` and `.chat-bubble`
|
|
64
|
+
stays opaque. Check custom themes on `--surface`, `--surface-raised` and
|
|
65
|
+
`--surface-subtle`.
|
|
66
|
+
- `.alert.admonition` follows `.solid`, `.surface` and `.outline`; a solid
|
|
67
|
+
admonition frames its body with `--border`.
|
|
68
|
+
- A `.list-item` moves its trailing region to a new line instead of breaking
|
|
69
|
+
the title mid-word.
|
|
70
|
+
- `.topbar` and `.form-actions.sticky` turn opaque under
|
|
71
|
+
`prefers-reduced-transparency: reduce`.
|
|
72
|
+
|
|
10
73
|
## 0.12 to 0.13
|
|
11
74
|
|
|
12
75
|
### Layout hooks stop at each layout
|
|
@@ -10,15 +10,13 @@ number of children visible in one mockup.
|
|
|
10
10
|
| A normally scrolling page | Semantic landmarks, optionally `.app-shell` |
|
|
11
11
|
| Topbar + scrolling main + adaptive nav | `.app-layout` |
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
where the primary navigation moves from bottom to side.
|
|
13
|
+
For public, marketing, and editorial pages, use semantic landmarks and add
|
|
14
|
+
`.navbar` for site navigation.
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
below.
|
|
16
|
+
Use `.app-layout` for a viewport-sized shell where the main region scrolls
|
|
17
|
+
independently and navigation moves from bottom to side. Follow its
|
|
18
|
+
[required structure](app-layout.md). For other arrangements, compose the
|
|
19
|
+
primitives below.
|
|
22
20
|
|
|
23
21
|
## Content relationships
|
|
24
22
|
|
|
@@ -39,14 +37,10 @@ all peers should move together rather than form a partial row, use `.switcher`.
|
|
|
39
37
|
|
|
40
38
|
For a main region plus an aside, use `.sidebar-layout`.
|
|
41
39
|
|
|
42
|
-
Use `.column-layout`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
primitive with no automatic responsive behavior: the canvas stays twelve
|
|
47
|
-
columns and the application owns narrow-container recomposition. Choose it
|
|
48
|
-
because placement is the design, not because a mockup happens to contain
|
|
49
|
-
columns.
|
|
40
|
+
Use `.column-layout` for deliberate placement on a shared 12-column canvas:
|
|
41
|
+
an inset article, aligned sections, or an editorial composition. It keeps
|
|
42
|
+
twelve columns at every width; add application CSS to rearrange it in narrow
|
|
43
|
+
containers.
|
|
50
44
|
|
|
51
45
|
Use `--grid-columns` for exact track templates that do not match a built-in
|
|
52
46
|
layout contract: arbitrary structural counts such as seven calendar days,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# Grid
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
column count.
|
|
3
|
+
Choose what determines the column count:
|
|
5
4
|
|
|
6
5
|
- The **item width** is what matters — use `.grid` and tune `--grid-min`.
|
|
7
6
|
- The **column density** is what matters — use `.grid-2`, `.grid-3`, `.grid-4`,
|
|
@@ -30,9 +29,8 @@ Tune the item minimum with `--grid-min`.
|
|
|
30
29
|
|
|
31
30
|
## Count-driven density
|
|
32
31
|
|
|
33
|
-
`.grid-N`
|
|
34
|
-
|
|
35
|
-
width.
|
|
32
|
+
`.grid-N` fits up to N equal-width columns and reduces the count as space
|
|
33
|
+
narrows. It is responsive without a container wrapper.
|
|
36
34
|
|
|
37
35
|
```html demo resize
|
|
38
36
|
<div class="grid-4">
|
|
@@ -43,8 +41,7 @@ width.
|
|
|
43
41
|
</div>
|
|
44
42
|
```
|
|
45
43
|
|
|
46
|
-
`--grid-min`
|
|
47
|
-
density is `.grid-N`'s. Choose the preset that suits your item size:
|
|
44
|
+
`--grid-min` applies only to `.grid`. Choose a preset that suits your item size:
|
|
48
45
|
|
|
49
46
|
| Item | Preset |
|
|
50
47
|
| --------------------------------- | -------------------- |
|
|
@@ -111,15 +108,10 @@ that width **plus its own padding and borders**:
|
|
|
111
108
|
Round up past the figure rather than matching it exactly, so a later padding
|
|
112
109
|
change cannot drop the region a state.
|
|
113
110
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
to that name, never to an incidental query container, so a region that sets
|
|
119
|
-
`container-type: inline-size` for its own reasons leaves the grid untouched. The container has to be an
|
|
120
|
-
ancestor: an element cannot query its own size without taking inline-size
|
|
121
|
-
containment, which would collapse the grid inside a `.cluster`, a float, or any
|
|
122
|
-
shrink-to-fit box. Put it on a normal block-level wrapper for the same reason.
|
|
111
|
+
Use a normal block-level ancestor as the named container, keeping it separate
|
|
112
|
+
from the grid. Only the name `actual-container` enables balanced subdivision;
|
|
113
|
+
an unnamed query container leaves the baseline behavior unchanged. The same
|
|
114
|
+
named container can serve both a grid and a step flow.
|
|
123
115
|
|
|
124
116
|
The chain balances the **declared density**, not your actual item count. Eight
|
|
125
117
|
items in `.grid-6` still give `6 + 2`. For a paginated collection, choose a page
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
# Intent Nesting
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An intent applies to the component carrying it. Nested components keep their
|
|
4
|
+
own default intent unless you give them one:
|
|
5
|
+
|
|
6
|
+
```html
|
|
7
|
+
<div class="alert danger">
|
|
8
|
+
Something went wrong.
|
|
9
|
+
<button class="btn" type="button">Dismiss</button>
|
|
10
|
+
<button class="btn primary" type="button">Retry</button>
|
|
11
|
+
</div>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The alert uses danger colors, Dismiss stays neutral, and Retry uses primary.
|
|
15
|
+
Set an intent on each component that needs it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "actual-css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Plain CSS component framework with semantic classes, universal variants, small tokens, theme hooks, and progressive enhancements.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "bun@1.4.3",
|
|
@@ -161,6 +161,6 @@
|
|
|
161
161
|
"happy-dom": "^21.0.1"
|
|
162
162
|
},
|
|
163
163
|
"dependencies": {
|
|
164
|
-
"@lekoala/floating": "^0.3.
|
|
164
|
+
"@lekoala/floating": "^0.3.1"
|
|
165
165
|
}
|
|
166
166
|
}
|
package/reserved-classes.json
CHANGED
|
@@ -232,9 +232,11 @@
|
|
|
232
232
|
"switch",
|
|
233
233
|
"switcher",
|
|
234
234
|
"tab",
|
|
235
|
+
"tab-panel",
|
|
235
236
|
"table",
|
|
236
237
|
"table-wrap",
|
|
237
238
|
"tabs",
|
|
239
|
+
"tabs-attached",
|
|
238
240
|
"text-balance",
|
|
239
241
|
"text-break",
|
|
240
242
|
"text-capitalize",
|
|
@@ -251,6 +253,7 @@
|
|
|
251
253
|
"text-wrap",
|
|
252
254
|
"textarea",
|
|
253
255
|
"tight",
|
|
256
|
+
"timeline",
|
|
254
257
|
"tooltip",
|
|
255
258
|
"topbar",
|
|
256
259
|
"touch-target",
|
|
@@ -18,12 +18,16 @@
|
|
|
18
18
|
* --accordion-pad
|
|
19
19
|
* --accordion-marker-color
|
|
20
20
|
* --accordion-marker-size
|
|
21
|
+
* --accordion-marker-icon
|
|
22
|
+
* --accordion-marker-open-rotate
|
|
21
23
|
*/
|
|
22
24
|
.accordion {
|
|
23
25
|
--accordion-radius: var(--radius);
|
|
24
26
|
--accordion-pad: var(--space-40);
|
|
25
27
|
--accordion-marker-color: var(--text-muted);
|
|
26
28
|
--accordion-marker-size: 1rem;
|
|
29
|
+
--accordion-marker-icon: var(--icon-chevron);
|
|
30
|
+
--accordion-marker-open-rotate: 180deg;
|
|
27
31
|
|
|
28
32
|
border: var(--border-width) solid var(--border);
|
|
29
33
|
border-radius: var(--accordion-radius);
|
|
@@ -68,13 +72,13 @@
|
|
|
68
72
|
inline-size: var(--accordion-marker-size);
|
|
69
73
|
block-size: var(--accordion-marker-size);
|
|
70
74
|
background-color: var(--accordion-marker-color);
|
|
71
|
-
-webkit-mask: var(--icon
|
|
72
|
-
mask: var(--icon
|
|
75
|
+
-webkit-mask: var(--accordion-marker-icon) center / contain no-repeat;
|
|
76
|
+
mask: var(--accordion-marker-icon) center / contain no-repeat;
|
|
73
77
|
transition: transform var(--duration);
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
.accordion details[open] summary::after {
|
|
77
|
-
transform: rotate(
|
|
81
|
+
transform: rotate(var(--accordion-marker-open-rotate));
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
/* The panel, not the item, owns the inset here — .separated paints a card on
|
|
@@ -172,6 +172,9 @@
|
|
|
172
172
|
/* No grid-template-columns: the icon and close branches below always set
|
|
173
173
|
it, since one of them is what matched. */
|
|
174
174
|
align-items: var(--items-align, start);
|
|
175
|
+
/* why: a stretched alert (equal-height grid row) spread its extra height
|
|
176
|
+
between the content rows, opening a gap under the title. */
|
|
177
|
+
align-content: start;
|
|
175
178
|
column-gap: var(--space-30);
|
|
176
179
|
}
|
|
177
180
|
|
|
@@ -179,9 +182,14 @@
|
|
|
179
182
|
grid-template-columns: auto minmax(0, 1fr);
|
|
180
183
|
}
|
|
181
184
|
|
|
185
|
+
/* why span 2, not 1 / -1: the rows are implicit, so -1 is line 1 and the
|
|
186
|
+
icon sat in the title row alone — any icon taller than one line inflated
|
|
187
|
+
that row and pushed the body down. Spanning the title and body rows lets
|
|
188
|
+
its height spread over both; only an icon taller than both together still
|
|
189
|
+
splits its excess between them. */
|
|
182
190
|
.alert:has(> .alert-icon) > .alert-icon {
|
|
183
191
|
grid-column: 1;
|
|
184
|
-
grid-row: 1 /
|
|
192
|
+
grid-row: 1 / span 2;
|
|
185
193
|
display: inline-grid;
|
|
186
194
|
place-items: center;
|
|
187
195
|
margin-block-start: 0.125em;
|
|
@@ -57,6 +57,8 @@
|
|
|
57
57
|
text-align: center;
|
|
58
58
|
text-decoration: none;
|
|
59
59
|
overflow-wrap: anywhere;
|
|
60
|
+
/* A rounded tile: opt out of the bare-link tap flash from base.css. */
|
|
61
|
+
-webkit-tap-highlight-color: transparent;
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
.app-nav > a > :where(svg, img, [aria-hidden="true"]) {
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
* --badge-default-fg
|
|
21
21
|
* --badge-default-border
|
|
22
22
|
* --badge-default-hover-bg
|
|
23
|
+
* --badge-slot-inset
|
|
24
|
+
* --badge-slot-size
|
|
23
25
|
* --badge-bg
|
|
24
26
|
* --badge-fg
|
|
25
27
|
* --badge-border
|
|
@@ -44,9 +46,13 @@
|
|
|
44
46
|
--badge-font-size: var(--font-size-sm);
|
|
45
47
|
--badge-icon-size: 1em;
|
|
46
48
|
--badge-dot-size: 0.5rem;
|
|
49
|
+
/* A leading .avatar and a trailing .close are slots: a disc inside the pill
|
|
50
|
+
at the same inset from its block edges and its rounded end. */
|
|
51
|
+
--badge-slot-inset: calc(var(--badge-size) / 12);
|
|
52
|
+
--badge-slot-size: calc(var(--badge-size) - 2 * (var(--border-width) + var(--badge-slot-inset)));
|
|
47
53
|
/* Declared on the badge, not the button, so an author can still set them
|
|
48
54
|
on either. Same element as --badge-size, so .sm/.lg carry through. */
|
|
49
|
-
--close-size:
|
|
55
|
+
--close-size: var(--badge-slot-size);
|
|
50
56
|
--close-icon-size: 0.875em;
|
|
51
57
|
--badge-default-bg: var(--surface-subtle);
|
|
52
58
|
--badge-default-fg: var(--intent, var(--text));
|
|
@@ -97,9 +103,11 @@
|
|
|
97
103
|
--badge-dot-size: 0.625rem;
|
|
98
104
|
}
|
|
99
105
|
|
|
100
|
-
/* Decorative children follow the badge's optical size. Text
|
|
101
|
-
button retain their own boxes
|
|
102
|
-
.
|
|
106
|
+
/* Decorative children follow the badge's optical size. Text, the .close
|
|
107
|
+
button and an .avatar retain their own boxes — an aria-hidden avatar would
|
|
108
|
+
otherwise tie with .avatar on specificity and shrink to an icon whenever
|
|
109
|
+
badge.css loads last. */
|
|
110
|
+
.badge > :where(svg, img, [aria-hidden="true"]:not(.dot, .avatar)) {
|
|
103
111
|
flex: none;
|
|
104
112
|
/* The shared rule maps --badge-icon-size onto font-size. One em is therefore
|
|
105
113
|
the requested optical size; reusing the em-valued hook here would apply its
|
|
@@ -164,17 +172,36 @@
|
|
|
164
172
|
background-color: currentColor;
|
|
165
173
|
}
|
|
166
174
|
|
|
167
|
-
/*
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
175
|
+
/* Person chip (mention, assignee, contributor) — a leading .avatar follows the
|
|
176
|
+
pill instead of its own scale, so the badge keeps its height. */
|
|
177
|
+
.badge > .avatar {
|
|
178
|
+
--avatar-size: var(--badge-slot-size);
|
|
179
|
+
/* Initials scale from the label, not the diameter: a diameter ratio left
|
|
180
|
+
them under 6px on .sm. em resolves against the badge's font size here. */
|
|
181
|
+
--avatar-font-size: 0.7em;
|
|
182
|
+
margin-inline-start: calc(var(--badge-slot-inset) - var(--badge-pad-x));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Removable tag — a trailing .close (components/close.css), the avatar's
|
|
186
|
+
mirror: a fill or the hover wash stays a disc inside the pill. */
|
|
171
187
|
.badge > .close {
|
|
172
|
-
|
|
173
|
-
margin-inline-
|
|
174
|
-
margin-inline-end: -0.45em;
|
|
188
|
+
position: relative;
|
|
189
|
+
margin-inline-end: calc(var(--badge-slot-inset) - var(--badge-pad-x));
|
|
175
190
|
border-radius: var(--radius-full);
|
|
176
191
|
}
|
|
177
192
|
|
|
193
|
+
/* WCAG 2.5.8 floors pointer targets at 24 CSS px. The disc is smaller on the
|
|
194
|
+
default and .sm badges, so a transparent pseudo-element — part of the
|
|
195
|
+
button's hit area — extends the target to the floor around it, past the pill
|
|
196
|
+
if need be, without painting anything there. */
|
|
197
|
+
.badge > .close::after {
|
|
198
|
+
content: "";
|
|
199
|
+
position: absolute;
|
|
200
|
+
/* Square on purpose: nothing paints it, and a round one would miss the
|
|
201
|
+
corners of the 24px target. */
|
|
202
|
+
inset: min(0px, calc((var(--close-size) - 24px) / 2));
|
|
203
|
+
}
|
|
204
|
+
|
|
178
205
|
/* Hover recipes — sets --ui-hover-bg consumed by the hover rule below.
|
|
179
206
|
Declared outside :hover like button.css for the same reason. */
|
|
180
207
|
:is(a.badge, button.badge).outline {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* --btn-radius
|
|
20
20
|
* --btn-gap
|
|
21
21
|
* --btn-hover-overlay
|
|
22
|
+
* --btn-shadow
|
|
22
23
|
* --btn-default-bg
|
|
23
24
|
* --btn-default-fg
|
|
24
25
|
* --btn-default-border
|
|
@@ -85,6 +86,11 @@
|
|
|
85
86
|
border-radius: var(--btn-radius);
|
|
86
87
|
background: var(--btn-bg);
|
|
87
88
|
color: var(--btn-fg);
|
|
89
|
+
/* why: an unset hook rather than none, so a theme or container can give
|
|
90
|
+
every button an elevation the hover overlay composes with instead of
|
|
91
|
+
replacing (see the hover rule). The hook accepts shadow-list items:
|
|
92
|
+
use 0 0 #0000 to remove elevation, since none invalidates that list. */
|
|
93
|
+
box-shadow: var(--btn-shadow, 0 0 #0000);
|
|
88
94
|
font: inherit;
|
|
89
95
|
font-size: var(--btn-font-size);
|
|
90
96
|
font-weight: var(--font-weight-medium);
|
|
@@ -169,8 +175,10 @@
|
|
|
169
175
|
background: var(--ui-hover-bg, var(--btn-bg));
|
|
170
176
|
/* Huge inset spread paints the overlay over any border-radius without a
|
|
171
177
|
pseudo-element; a plain background would replace the fill instead of
|
|
172
|
-
darkening it. */
|
|
173
|
-
box-shadow:
|
|
178
|
+
darkening it. Listed after --btn-shadow, which it must not drop. */
|
|
179
|
+
box-shadow:
|
|
180
|
+
var(--btn-shadow, 0 0 #0000),
|
|
181
|
+
inset 0 0 0 999px var(--btn-hover-overlay);
|
|
174
182
|
}
|
|
175
183
|
|
|
176
184
|
.btn:not(:where(:disabled, [aria-disabled="true"])):active {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
* --card-fg
|
|
29
29
|
* --heading
|
|
30
30
|
* --busy-overlay-bg
|
|
31
|
+
* --surface-link
|
|
31
32
|
*/
|
|
32
33
|
/* Intent boundary — inherited intents do not tint this component.
|
|
33
34
|
Local intent classes still win because :where() has zero specificity.
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
when they paint this surface, so an ancestor intent would otherwise leak
|
|
37
38
|
through a variant that has no local intent class. */
|
|
38
39
|
:where(.card) {
|
|
40
|
+
--surface-link: initial;
|
|
39
41
|
--intent: initial;
|
|
40
42
|
--intent-fg: initial;
|
|
41
43
|
--intent-soft-fg: initial;
|
|
@@ -71,6 +73,13 @@
|
|
|
71
73
|
border-radius: var(--card-radius);
|
|
72
74
|
}
|
|
73
75
|
|
|
76
|
+
/* Theme link ink is tuned for the page, not an intent fill. currentColor
|
|
77
|
+
follows the surrounding copy without freezing a parent's resolved ink;
|
|
78
|
+
the card and theme boundaries reset this internal relay above/in theme.css. */
|
|
79
|
+
.card.solid {
|
|
80
|
+
--surface-link: currentColor;
|
|
81
|
+
}
|
|
82
|
+
|
|
74
83
|
/* The box lives at zero specificity so a layout primitive applied to the same
|
|
75
84
|
element owns it. components/ is imported after layout/, so a plain .card
|
|
76
85
|
declaration would beat .media (and any other non-column primitive) on source
|
|
@@ -38,6 +38,17 @@
|
|
|
38
38
|
0 0 / 200% 100%;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/* Translucent ink tints show the surface they sit on. Fixed surfaces did
|
|
42
|
+
not: the --surface-raised highlight matched a card or a light page, so the
|
|
43
|
+
shape lost its edges mid-sweep, and a soft card or dark page made the track
|
|
44
|
+
inverted or invisible. The highlight keeps a tint so the edge never goes. */
|
|
45
|
+
@supports (color: color-mix(in oklab, red, blue)) {
|
|
46
|
+
.skeleton {
|
|
47
|
+
--skeleton-track: color-mix(in oklab, currentColor 10%, transparent);
|
|
48
|
+
--skeleton-highlight: color-mix(in oklab, currentColor 4%, transparent);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
41
52
|
@media (prefers-reduced-motion: no-preference) {
|
|
42
53
|
.skeleton {
|
|
43
54
|
animation: actual-skeleton var(--duration-shimmer) ease-in-out infinite;
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
* Public hooks:
|
|
21
21
|
* --tab-flex
|
|
22
22
|
* --tab-gap
|
|
23
|
+
* --tab-panel-bg
|
|
24
|
+
* --tab-panel-pad
|
|
25
|
+
* --tab-panel-shadow
|
|
23
26
|
*
|
|
24
27
|
* Internal:
|
|
25
28
|
* --tab-edge
|
|
@@ -249,3 +252,77 @@
|
|
|
249
252
|
.tabs > li > .tab {
|
|
250
253
|
inline-size: 100%;
|
|
251
254
|
}
|
|
255
|
+
|
|
256
|
+
/* Attached horizontal tabs share a surface with their panels. The strip
|
|
257
|
+
draws the panel's top edge inside its scrollport: no overlapping layers
|
|
258
|
+
or outside ink that overflow clipping could cut off. Direct children
|
|
259
|
+
keep an ordinary or nested tablist inside a panel independent. */
|
|
260
|
+
.tabs-attached {
|
|
261
|
+
--tab-panel-bg: var(--surface-raised);
|
|
262
|
+
--tab-panel-pad: var(--space-40);
|
|
263
|
+
--tab-panel-shadow: none;
|
|
264
|
+
|
|
265
|
+
display: grid;
|
|
266
|
+
gap: 0;
|
|
267
|
+
min-inline-size: 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.tabs-attached > .tabs {
|
|
271
|
+
gap: 0;
|
|
272
|
+
border: 0;
|
|
273
|
+
background:
|
|
274
|
+
linear-gradient(var(--border), var(--border)) bottom / 100% var(--border-width) no-repeat;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.tabs-attached > .tabs > .tab {
|
|
278
|
+
border: var(--border-width) solid var(--border);
|
|
279
|
+
background: var(--surface-subtle);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.tabs-attached > .tabs > .tab + .tab {
|
|
283
|
+
margin-inline-start: calc(-1 * var(--border-width));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.tabs-attached > .tabs > .tab[aria-selected="true"] {
|
|
287
|
+
background: var(--tab-panel-bg);
|
|
288
|
+
color: var(--text);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.tabs-attached > .tabs > .tab[aria-selected="true"]::after {
|
|
292
|
+
/* Keep all four border colors equal: differently colored bottom borders
|
|
293
|
+
meet the sides diagonally. Erase only the inner bottom edge so the
|
|
294
|
+
vertical strokes reach the panel with square ends. */
|
|
295
|
+
inset-block-end: calc(-1 * var(--border-width));
|
|
296
|
+
block-size: var(--border-width);
|
|
297
|
+
border: 0;
|
|
298
|
+
background: var(--tab-panel-bg);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.tabs-attached > .tab-panel {
|
|
302
|
+
min-inline-size: 0;
|
|
303
|
+
margin: 0;
|
|
304
|
+
padding: var(--tab-panel-pad);
|
|
305
|
+
border: var(--border-width) solid var(--border);
|
|
306
|
+
border-block-start: 0;
|
|
307
|
+
background: var(--tab-panel-bg);
|
|
308
|
+
box-shadow: var(--tab-panel-shadow);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* Forced colors remove gradients and shadows. A real strip edge and the
|
|
312
|
+
user's selection colors preserve both the frame and the selected state. */
|
|
313
|
+
@media (forced-colors: active) {
|
|
314
|
+
.tabs-attached > .tabs {
|
|
315
|
+
border-block-end: var(--border-width) solid CanvasText;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.tabs-attached > .tabs > .tab[aria-selected="true"] {
|
|
319
|
+
forced-color-adjust: none;
|
|
320
|
+
border-color: CanvasText;
|
|
321
|
+
background: Highlight;
|
|
322
|
+
color: HighlightText;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.tabs-attached > .tabs > .tab[aria-selected="true"]::after {
|
|
326
|
+
content: none;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
* Public hooks:
|
|
16
16
|
* --table-min
|
|
17
17
|
* --table-cell-pad
|
|
18
|
+
*
|
|
19
|
+
* Theme hooks (unset by default, read with a fallback, so a theme sets them
|
|
20
|
+
* once on its root and third-party grid bridges can read the same choice):
|
|
21
|
+
* --table-header-bg
|
|
22
|
+
* --table-header-fg
|
|
18
23
|
*/
|
|
19
24
|
.table-wrap {
|
|
20
25
|
/* Containing block for anything absolutely positioned inside the table —
|
|
@@ -65,11 +70,12 @@
|
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
.table thead th {
|
|
73
|
+
color: var(--table-header-fg, var(--text-muted));
|
|
68
74
|
vertical-align: bottom;
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
.table thead {
|
|
72
|
-
background: var(--surface-subtle);
|
|
78
|
+
background: var(--table-header-bg, var(--surface-subtle));
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
.table tbody tr:hover {
|