shelving 1.285.6 → 1.285.7
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/package.json +1 -1
- package/ui/block/Card.d.ts +1 -1
- package/ui/block/Card.js +1 -1
- package/ui/block/Card.md +12 -12
- package/ui/block/Card.module.css +4 -5
- package/ui/block/Card.tsx +1 -1
- package/ui/block/Panel.md +5 -5
- package/ui/block/Panel.module.css +2 -3
- package/ui/layout/SidebarLayout.md +2 -2
- package/ui/layout/SidebarLayout.module.css +2 -3
- package/ui/menu/Menu.md +2 -2
- package/ui/menu/Menu.module.css +10 -9
- package/ui/menu/MenuItem.md +4 -4
- package/ui/style/TINT_CLASS.md +1 -1
package/package.json
CHANGED
package/ui/block/Card.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface CardProps extends ClickableProps, StatusVariants, BlockVariants
|
|
|
23
23
|
* - When `href` or `onClick` is set the card becomes navigable: a stretched overlay `<a>` / `<button>` covers the entire card while the children render normally inside.
|
|
24
24
|
* - Real interactive elements inside the card (e.g. inline `<a>` links) stay clickable thanks to `position: relative; z-index: 2` rules in the stylesheet.
|
|
25
25
|
* - Accepts a `status` colour and raw `ColorProps` — the card styles the box; lay out its contents however the use case needs.
|
|
26
|
-
* -
|
|
26
|
+
* - Has no drop shadow by default — set `shadow="small"`, `shadow="normal"` or `shadow="large"` to raise a card.
|
|
27
27
|
*
|
|
28
28
|
* @kind component
|
|
29
29
|
* @see https://shelving.cc/ui/Card
|
package/ui/block/Card.js
CHANGED
|
@@ -11,7 +11,7 @@ import CARD_CSS from "./Card.module.css";
|
|
|
11
11
|
* - When `href` or `onClick` is set the card becomes navigable: a stretched overlay `<a>` / `<button>` covers the entire card while the children render normally inside.
|
|
12
12
|
* - Real interactive elements inside the card (e.g. inline `<a>` links) stay clickable thanks to `position: relative; z-index: 2` rules in the stylesheet.
|
|
13
13
|
* - Accepts a `status` colour and raw `ColorProps` — the card styles the box; lay out its contents however the use case needs.
|
|
14
|
-
* -
|
|
14
|
+
* - Has no drop shadow by default — set `shadow="small"`, `shadow="normal"` or `shadow="large"` to raise a card.
|
|
15
15
|
*
|
|
16
16
|
* @kind component
|
|
17
17
|
* @see https://shelving.cc/ui/Card
|
package/ui/block/Card.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Card
|
|
2
2
|
|
|
3
|
-
A boxed surface that groups a self-contained piece of content. Rendered as an `<article>`, painted from the tint ladder (surface,
|
|
3
|
+
A boxed surface that groups a self-contained piece of content. Rendered as an `<article>`, painted from the tint ladder (surface, text) and styled with rounded corners and padding by default.
|
|
4
4
|
|
|
5
5
|
**Things to know:**
|
|
6
6
|
|
|
7
7
|
- Set `href` or `onClick` to make the whole card navigable — a stretched, visually-hidden overlay `<a>` / `<button>` covers the card while the children render normally inside. Real interactive elements inside the card (inline links, buttons) stay clickable and keyboard-focusable.
|
|
8
|
-
- `color=` and `status=` move the tint anchor for the card's scope, so the surface,
|
|
8
|
+
- `color=` and `status=` move the tint anchor for the card's scope, so the surface, text, and hover shade all re-derive together — and nested components (`<Tag>`, `<Preformatted>`, `<Button>`) inherit the same tint.
|
|
9
9
|
- A card styles only the box. Lay out its contents with the usual block components (`<Subheading>`, `<Paragraph>`, `<Row>`, …).
|
|
10
|
-
- Cards
|
|
10
|
+
- Cards have no drop shadow by default — set `shadow="small"`, `shadow="normal"` or `shadow="large"` to raise a given card.
|
|
11
11
|
- Composes the standard styling variants: `color`, `status`, `padding`, `space`, `width`, `shadow`, plus typography.
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
@@ -49,14 +49,14 @@ import { Card, Subheading } from "shelving/ui";
|
|
|
49
49
|
```tsx
|
|
50
50
|
import { Card, Subheading } from "shelving/ui";
|
|
51
51
|
|
|
52
|
-
//
|
|
53
|
-
<Card shadow="
|
|
54
|
-
<Card shadow="large"><Subheading>Raised</Subheading></Card>
|
|
52
|
+
// Raise a card a little or a lot.
|
|
53
|
+
<Card shadow="small"><Subheading>Raised</Subheading></Card>
|
|
54
|
+
<Card shadow="large"><Subheading>Raised more</Subheading></Card>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
## Styling
|
|
58
58
|
|
|
59
|
-
`Card` paints from the [tint ladder](/ui/TINT_CLASS); override these hooks at `:root` (or any ancestor scope) to retheme. Apply `color=` / `status=` (on the card or an ancestor scope) to recolour everything at once — surface,
|
|
59
|
+
`Card` paints from the [tint ladder](/ui/TINT_CLASS); override these hooks at `:root` (or any ancestor scope) to retheme. Apply `color=` / `status=` (on the card or an ancestor scope) to recolour everything at once — surface, text, and hover shade re-derive together; reach for a per-property hook for a single surgical change.
|
|
60
60
|
|
|
61
61
|
| Variable | Styles | Default |
|
|
62
62
|
|---|---|---|
|
|
@@ -64,20 +64,20 @@ import { Card, Subheading } from "shelving/ui";
|
|
|
64
64
|
| `--card-hover-background` | Surface fill when a navigable card is hovered | `var(--tint-95)` |
|
|
65
65
|
| `--card-color` | Text colour | `var(--tint-00)` |
|
|
66
66
|
| `--card-border` | Border shorthand | `var(--card-stroke) solid var(--tint-80)` |
|
|
67
|
-
| `--card-stroke` | Border
|
|
67
|
+
| `--card-stroke` | Border thickness — set it (e.g. `var(--stroke-normal)`) to show the border | `0` |
|
|
68
68
|
| `--card-radius` | Corner radius | `var(--radius-normal)` (16px) |
|
|
69
69
|
| `--card-padding` | Inner padding | `var(--space-normal)` (16px) |
|
|
70
70
|
| `--card-space` | Outer block margin (top + bottom) | `var(--space-paragraph)` (16px) |
|
|
71
|
-
| `--card-shadow` | Drop shadow | `
|
|
71
|
+
| `--card-shadow` | Drop shadow | `none` |
|
|
72
72
|
| `--card-transition` | Transition | `all var(--duration-fast)` (150ms) |
|
|
73
73
|
| `--card-focus-border` | Focus outline | `var(--stroke-focus) solid var(--color-focus)` |
|
|
74
74
|
|
|
75
|
-
**Global tokens it reads** — move these to retheme broadly rather than overriding ladder steps directly: the tint ladder `--tint-00` / `--tint-80` / `--tint-90` / `--tint-95`, plus `--space-normal`, `--space-paragraph`, `--radius-normal`, `--
|
|
75
|
+
**Global tokens it reads** — move these to retheme broadly rather than overriding ladder steps directly: the tint ladder `--tint-00` / `--tint-80` / `--tint-90` / `--tint-95`, plus `--space-normal`, `--space-paragraph`, `--radius-normal`, `--stroke-focus`, `--color-focus`, and `--duration-fast`.
|
|
76
76
|
|
|
77
77
|
```css
|
|
78
|
-
/* Theme:
|
|
78
|
+
/* Theme: raised cards with tighter corners. */
|
|
79
79
|
:root {
|
|
80
|
-
--card-shadow:
|
|
80
|
+
--card-shadow: var(--shadow-normal);
|
|
81
81
|
--card-radius: var(--radius-small);
|
|
82
82
|
}
|
|
83
83
|
```
|
package/ui/block/Card.module.css
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@import url("../style/Color.module.css");
|
|
3
3
|
@import url("../style/Duration.module.css");
|
|
4
4
|
@import url("../style/Radius.module.css");
|
|
5
|
-
@import url("../style/Shadow.module.css");
|
|
6
5
|
@import url("../style/Space.module.css");
|
|
7
6
|
@import url("../style/Stroke.module.css");
|
|
8
7
|
@import url("../style/Tint.module.css");
|
|
@@ -24,22 +23,22 @@
|
|
|
24
23
|
position: relative;
|
|
25
24
|
margin-inline: 0;
|
|
26
25
|
margin-block: var(--card-space, var(--space-paragraph));
|
|
27
|
-
border: var(--card-border, var(--card-stroke,
|
|
26
|
+
border: var(--card-border, var(--card-stroke, 0) solid var(--tint-80));
|
|
28
27
|
padding: var(--card-padding, var(--space-normal));
|
|
29
28
|
border-radius: var(--card-radius, var(--radius-normal));
|
|
30
29
|
|
|
31
30
|
/* Style */
|
|
32
31
|
background: var(--card-background, var(--tint-90));
|
|
33
32
|
color: var(--card-color, var(--tint-00));
|
|
34
|
-
box-shadow: var(--card-shadow,
|
|
33
|
+
box-shadow: var(--card-shadow, none);
|
|
35
34
|
transition: var(--card-transition, all var(--duration-fast));
|
|
36
35
|
outline: var(--card-focus-border, var(--stroke-focus) solid var(--color-focus));
|
|
37
|
-
outline-offset: calc(0px - var(--
|
|
36
|
+
outline-offset: calc(0px - var(--stroke-focus)); /* Fully inset, so it sits inside the card edge. */
|
|
38
37
|
|
|
39
38
|
/* Hover/focus affordance driven by the overlay link/button. */
|
|
40
39
|
&:has(.overlay:hover) {
|
|
41
40
|
background: var(--card-hover-background, var(--tint-95));
|
|
42
|
-
border: var(--card-hover-border, var(--card-stroke,
|
|
41
|
+
border: var(--card-hover-border, var(--card-stroke, 0) solid var(--tint-90));
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
44
|
|
package/ui/block/Card.tsx
CHANGED
|
@@ -27,7 +27,7 @@ export interface CardProps extends ClickableProps, StatusVariants, BlockVariants
|
|
|
27
27
|
* - When `href` or `onClick` is set the card becomes navigable: a stretched overlay `<a>` / `<button>` covers the entire card while the children render normally inside.
|
|
28
28
|
* - Real interactive elements inside the card (e.g. inline `<a>` links) stay clickable thanks to `position: relative; z-index: 2` rules in the stylesheet.
|
|
29
29
|
* - Accepts a `status` colour and raw `ColorProps` — the card styles the box; lay out its contents however the use case needs.
|
|
30
|
-
* -
|
|
30
|
+
* - Has no drop shadow by default — set `shadow="small"`, `shadow="normal"` or `shadow="large"` to raise a card.
|
|
31
31
|
*
|
|
32
32
|
* @kind component
|
|
33
33
|
* @see https://shelving.cc/ui/Card
|
package/ui/block/Panel.md
CHANGED
|
@@ -7,8 +7,8 @@ A full-width vertical region that paints the current surface colour. Use panels
|
|
|
7
7
|
- A panel always spans the full width of its container. To constrain the content inside, compose a `<Block>` `width="narrow"` (or `width="wide"`) within it.
|
|
8
8
|
- Block margin is always zero so panels stack flush; control the vertical breathing room with the `padding` variant (`<Panel padding="large">`, `<Panel padding="none">`).
|
|
9
9
|
- Inline padding ("indent") keeps content off the edges by default. Override it per-property with `--panel-indent`, or change it with the shared `indent` variant (`<Panel indent="large">`, `<Panel indent="none">`).
|
|
10
|
-
- `color=` / `status=` move the tint anchor for the whole panel scope, so the surface
|
|
11
|
-
-
|
|
10
|
+
- `color=` / `status=` move the tint anchor for the whole panel scope, so the surface and text re-derive together and cascade into nested content.
|
|
11
|
+
- Panels have no border by default. Set `--panel-stroke` (or `--panel-border`) to add top and bottom borders; the first and last panel drop them so the page doesn't gain stray edge lines.
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
@@ -31,15 +31,15 @@ import { Panel, Block, Title, Paragraph } from "shelving/ui";
|
|
|
31
31
|
|
|
32
32
|
## Styling
|
|
33
33
|
|
|
34
|
-
`Panel` paints from the [tint ladder](/ui/TINT_CLASS); apply `color=` / `status=` (on the panel or an ancestor scope) to recolour the whole scope at once — surface
|
|
34
|
+
`Panel` paints from the [tint ladder](/ui/TINT_CLASS); apply `color=` / `status=` (on the panel or an ancestor scope) to recolour the whole scope at once — surface and text re-derive together — or reach for a per-property hook for a single change.
|
|
35
35
|
|
|
36
36
|
| Variable | Styles | Default |
|
|
37
37
|
|---|---|---|
|
|
38
38
|
| `--panel-background` | Surface fill | `var(--tint-90)` |
|
|
39
39
|
| `--panel-color` | Text colour | `var(--tint-00)` |
|
|
40
40
|
| `--panel-border` | Top/bottom border shorthand | `var(--panel-stroke) solid var(--tint-80)` |
|
|
41
|
-
| `--panel-stroke` | Border thickness
|
|
41
|
+
| `--panel-stroke` | Border thickness — set it (e.g. `var(--stroke-normal)`) to show the border | `0` |
|
|
42
42
|
| `--panel-padding` | Block padding (top + bottom) | `var(--space-section)` (2rem) |
|
|
43
43
|
| `--panel-indent` | Inline padding (left + right) keeping content off the edges | `var(--space-normal)` (16px) |
|
|
44
44
|
|
|
45
|
-
**Global tokens it reads:** the tint-ladder steps `--tint-00` / `--tint-80` / `--tint-90`, plus `--
|
|
45
|
+
**Global tokens it reads:** the tint-ladder steps `--tint-00` / `--tint-80` / `--tint-90`, plus `--space-section`, and `--space-normal`. The shared `padding` variant overrides `--panel-padding`; the shared `indent` variant overrides `--panel-indent`.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@import url("../style/layers.css");
|
|
2
|
-
@import url("../style/Stroke.module.css");
|
|
3
2
|
@import url("../style/Tint.module.css");
|
|
4
3
|
@import url("../style/Space.module.css");
|
|
5
4
|
|
|
@@ -18,8 +17,8 @@
|
|
|
18
17
|
position: relative;
|
|
19
18
|
padding-block: var(--panel-padding, var(--space-section));
|
|
20
19
|
padding-inline: var(--panel-indent, var(--space-normal));
|
|
21
|
-
border-top: var(--panel-border, var(--panel-stroke,
|
|
22
|
-
border-bottom: var(--panel-border, var(--panel-stroke,
|
|
20
|
+
border-top: var(--panel-border, var(--panel-stroke, 0) solid var(--tint-80));
|
|
21
|
+
border-bottom: var(--panel-border, var(--panel-stroke, 0) solid var(--tint-80));
|
|
23
22
|
|
|
24
23
|
/* Style */
|
|
25
24
|
background: var(--panel-background, var(--tint-90));
|
|
@@ -43,8 +43,8 @@ Layouts compose naturally as `<Router>` route values — wrap a group of routes
|
|
|
43
43
|
| `--sidebar-layout-color` | Text colour for the layout (set on `body`, inherited by the content column) | `var(--tint-00)` (black) |
|
|
44
44
|
| `--sidebar-layout-sidebar-background` | Sidebar column fill | `var(--tint-90)` (one shade darker than the page) |
|
|
45
45
|
| `--sidebar-layout-sidebar-color` | Sidebar column text colour | `var(--tint-00)` (black) |
|
|
46
|
-
| `--sidebar-layout-border` | Divider between sidebar and content
|
|
46
|
+
| `--sidebar-layout-border` | Divider between sidebar and content, e.g. `1px solid var(--tint-80)` | `none` |
|
|
47
47
|
|
|
48
48
|
The sidebar and content columns own their own scroll behaviour directly (this layout no longer composes a shared `.layout` class).
|
|
49
49
|
|
|
50
|
-
**Global tokens it reads** — `--tint-00` / `--tint-
|
|
50
|
+
**Global tokens it reads** — `--tint-00` / `--tint-90` / `--tint-100`, plus `--space-normal`, `--duration-normal`, and `--color-shadow`.
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@import url("../style/Color.module.css");
|
|
3
3
|
@import url("../style/Duration.module.css");
|
|
4
4
|
@import url("../style/Space.module.css");
|
|
5
|
-
@import url("../style/Stroke.module.css");
|
|
6
5
|
@import url("../style/Tint.module.css");
|
|
7
6
|
@import url("../style/Shadow.module.css");
|
|
8
7
|
|
|
@@ -74,7 +73,7 @@
|
|
|
74
73
|
.sidebar {
|
|
75
74
|
/* Box */
|
|
76
75
|
display: flow-root;
|
|
77
|
-
border-right: var(--sidebar-layout-border,
|
|
76
|
+
border-right: var(--sidebar-layout-border, none);
|
|
78
77
|
|
|
79
78
|
/* Scrolling */
|
|
80
79
|
overflow-y: auto;
|
|
@@ -118,7 +117,7 @@
|
|
|
118
117
|
.main.right .sidebar {
|
|
119
118
|
grid-column: 2;
|
|
120
119
|
border-right: none;
|
|
121
|
-
border-left: var(--sidebar-layout-border,
|
|
120
|
+
border-left: var(--sidebar-layout-border, none);
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
.main.right .content {
|
package/ui/menu/Menu.md
CHANGED
|
@@ -29,13 +29,13 @@ import { Menu, MenuItem } from "shelving/ui";
|
|
|
29
29
|
|
|
30
30
|
| Variable | Styles | Default |
|
|
31
31
|
|---|---|---|
|
|
32
|
-
| `--menu-gap` | Vertical gap between items | `
|
|
32
|
+
| `--menu-gap` | Vertical gap between items | `0` |
|
|
33
33
|
| `--menu-font` | Font family | `var(--font-body)` |
|
|
34
34
|
| `--menu-size` | Font size | `var(--size-normal)` |
|
|
35
35
|
| `--menu-leading` | Line height | `var(--leading)` |
|
|
36
36
|
| `--menu-color` | Text colour | `var(--tint-00)` |
|
|
37
37
|
| `--menu-nested-space` | Block margin around a nested submenu | `var(--space-xxsmall)` |
|
|
38
|
-
| `--menu-padding` | Item link padding (also insets the nested border) | `var(--space-
|
|
38
|
+
| `--menu-padding` | Item link padding (also insets the nested border) | `var(--space-xsmall)` |
|
|
39
39
|
| `--menu-nested-border` | Nested submenu left-border width | `var(--stroke-focus)` |
|
|
40
40
|
| `--menu-nested-color-border` | Nested submenu left-border colour | `var(--tint-50)` |
|
|
41
41
|
| `--menu-nested-indent` | Nested submenu left padding | `var(--space-xsmall)` |
|
package/ui/menu/Menu.module.css
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
padding: 0;
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
|
-
gap: var(--menu-gap,
|
|
16
|
+
gap: var(--menu-gap, 0);
|
|
17
17
|
|
|
18
18
|
/* Text */
|
|
19
19
|
font-family: var(--menu-font, var(--font-body));
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
margin-block: var(--menu-nested-space, var(--space-xxsmall));
|
|
27
27
|
|
|
28
28
|
/* Inset the border by the link's inline padding so it lines up with the parent item's label. */
|
|
29
|
-
margin-inline-start: var(--menu-padding, var(--space-
|
|
29
|
+
margin-inline-start: var(--menu-padding, var(--space-xsmall));
|
|
30
30
|
border-inline-start: var(--menu-nested-border, var(--stroke-focus)) solid var(--menu-nested-color-border, var(--tint-50));
|
|
31
31
|
padding-inline-start: var(--menu-nested-indent, var(--space-xsmall));
|
|
32
32
|
}
|
|
@@ -37,12 +37,13 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.link {
|
|
40
|
-
/* Box — `inline-size` and `border` also reset the `<button>` an `onClick` item renders. */
|
|
40
|
+
/* Box — `inline-size` and `border` also reset the `<button>` an `onClick` item renders. `border-box` keeps the padding inside the full width. */
|
|
41
41
|
display: block;
|
|
42
|
+
box-sizing: border-box;
|
|
42
43
|
inline-size: 100%;
|
|
43
|
-
padding: var(--menu-padding, var(--space-
|
|
44
|
+
padding: var(--menu-padding, var(--space-xsmall));
|
|
44
45
|
border: none;
|
|
45
|
-
border-radius: var(--menu-radius, var(--radius-
|
|
46
|
+
border-radius: var(--menu-radius, var(--radius-xsmall));
|
|
46
47
|
|
|
47
48
|
/* Style — `background`, `font`, `text-align` and `cursor` reset the native button look. */
|
|
48
49
|
background: none;
|
|
@@ -53,11 +54,11 @@
|
|
|
53
54
|
cursor: pointer;
|
|
54
55
|
transition: all 120ms ease-in-out;
|
|
55
56
|
outline: var(--menu-focus-border, var(--stroke-focus) solid var(--color-focus));
|
|
56
|
-
outline-offset: calc(0px - var(--stroke-
|
|
57
|
+
outline-offset: calc(0px - var(--stroke-focus)); /* Fully inset, so a neighbouring item's background can't paint over it. */
|
|
57
58
|
|
|
58
|
-
/* Pseudo-classes */
|
|
59
|
-
&:hover,
|
|
60
|
-
&:focus:not(:focus-visible) {
|
|
59
|
+
/* Pseudo-classes — skip the active item, so it keeps its own background while hovered or focused. */
|
|
60
|
+
&:not(.active):hover,
|
|
61
|
+
&:not(.active):focus:not(:focus-visible) {
|
|
61
62
|
background: var(--menu-hover-background, var(--tint-90));
|
|
62
63
|
color: var(--menu-hover-color, var(--tint-00));
|
|
63
64
|
}
|
package/ui/menu/MenuItem.md
CHANGED
|
@@ -31,18 +31,18 @@ The item link's hooks (defined in `Menu.module.css`):
|
|
|
31
31
|
|
|
32
32
|
| Variable | Styles | Default |
|
|
33
33
|
|---|---|---|
|
|
34
|
-
| `--menu-padding` | Link inner padding | `var(--space-
|
|
35
|
-
| `--menu-radius` | Link corner radius | `var(--radius-
|
|
34
|
+
| `--menu-padding` | Link inner padding | `var(--space-xsmall)` |
|
|
35
|
+
| `--menu-radius` | Link corner radius | `var(--radius-xsmall)` |
|
|
36
36
|
| `--menu-focus-border` | Focus outline | `var(--stroke-focus) solid var(--color-focus)` |
|
|
37
37
|
| `--menu-hover-background` | Link fill on hover/focus | `var(--tint-90)` |
|
|
38
38
|
| `--menu-hover-color` | Link text colour on hover/focus | `var(--tint-00)` |
|
|
39
39
|
| `--menu-proud-background` | Fill when proud (ancestor of current page) | `transparent` |
|
|
40
40
|
| `--menu-proud` | Text colour when proud | `var(--tint-00)` |
|
|
41
41
|
| `--menu-proud-weight` | Font weight when proud | `var(--weight-strong)` |
|
|
42
|
-
| `--menu-active-background` | Fill when active (current page) | `var(--tint-100)` |
|
|
42
|
+
| `--menu-active-background` | Fill when active (current page), also while hovered or focused | `var(--tint-100)` |
|
|
43
43
|
| `--menu-active-color` | Text colour when active | `var(--tint-00)` |
|
|
44
44
|
| `--menu-active-weight` | Font weight when active | `var(--weight-strong)` |
|
|
45
45
|
|
|
46
46
|
List-level hooks (`--menu-gap`, `--menu-color`, the nested-submenu hooks, etc.) are documented on `<Menu>`.
|
|
47
47
|
|
|
48
|
-
**Global tokens it reads** — the tint ladder `--tint-00` / `--tint-90` / `--tint-100`, plus `--space-
|
|
48
|
+
**Global tokens it reads** — the tint ladder `--tint-00` / `--tint-90` / `--tint-100`, plus `--space-xsmall`, `--radius-xsmall`, `--stroke-focus`, `--color-focus`, and `--weight-strong`.
|
package/ui/style/TINT_CLASS.md
CHANGED
|
@@ -43,6 +43,6 @@ A theme is a CSS file of custom-property overrides at `:root`, imported after th
|
|
|
43
43
|
|
|
44
44
|
1. **Move a palette colour.** Overriding `--color-gray` moves the default anchor, retinting every neutral ladder in the app — the broadest possible change. Overriding `--color-red`, `--color-primary`, etc. re-aims every variant and status that maps to it.
|
|
45
45
|
2. **Retint a region.** Apply `color=` / `status=` to a container — `<Card color="purple">`, or a `<Panel color="purple">` wrapping a whole section — and everything inside re-tints, with text, border, surface, and hover shades all derived for free. Components don't expose a per-component `--x-tint` hook; the variant moves the anchor, not a bespoke variable.
|
|
46
|
-
3. **Override one property.** Per-property hooks are the scalpel: `--button-radius: 999px`, `--card-
|
|
46
|
+
3. **Override one property.** Per-property hooks are the scalpel: `--button-radius: 999px`, `--card-radius: 0`, `--tag-case: none`.
|
|
47
47
|
|
|
48
48
|
**Don't override individual ladder steps (`--tint-90`, etc.) at `:root`.** The ladder is *recomputed* from the anchor inside every `TINT_CLASS` scope — which includes every component that accepts `color=` or `status=` — so a step override at `:root` only reaches untinted regions and produces inconsistent surfaces. Move the anchor (option 1 or 2) instead, and the steps follow.
|