shelving 1.297.0 → 1.297.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/package.json +1 -1
- package/ui/block/Card.md +1 -1
- package/ui/block/Card.module.css +8 -6
package/package.json
CHANGED
package/ui/block/Card.md
CHANGED
|
@@ -71,7 +71,7 @@ import { Card, Subheading } from "shelving/ui";
|
|
|
71
71
|
| `--card-space` | Outer block margin (top + bottom) | `var(--space-paragraph)` (16px) |
|
|
72
72
|
| `--card-shadow` | Drop shadow | `none` |
|
|
73
73
|
| `--card-transition` | Transition | `all var(--duration-fast)` (150ms) |
|
|
74
|
-
| `--card-focus-border` | Focus outline | `var(--stroke-focus) solid var(--color-focus)` |
|
|
74
|
+
| `--card-focus-border` | Focus outline, drawn on the navigable overlay so it shows above children like `<Panel>` | `var(--stroke-focus) solid var(--color-focus)` |
|
|
75
75
|
|
|
76
76
|
**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`.
|
|
77
77
|
|
package/ui/block/Card.module.css
CHANGED
|
@@ -33,8 +33,6 @@
|
|
|
33
33
|
color: var(--card-color, var(--tint-00));
|
|
34
34
|
box-shadow: var(--card-shadow, none);
|
|
35
35
|
transition: var(--card-transition, all var(--duration-fast));
|
|
36
|
-
outline: var(--card-focus-border, var(--stroke-focus) solid var(--color-focus));
|
|
37
|
-
outline-offset: calc(0px - var(--stroke-focus)); /* Fully inset, so it sits inside the card edge. */
|
|
38
36
|
|
|
39
37
|
/* Hover/focus affordance driven by the overlay link/button. */
|
|
40
38
|
&:has(.overlay:hover) {
|
|
@@ -50,11 +48,15 @@
|
|
|
50
48
|
inset: 0;
|
|
51
49
|
z-index: 1;
|
|
52
50
|
border: 0;
|
|
51
|
+
border-radius: inherit;
|
|
53
52
|
|
|
54
53
|
/* Style */
|
|
55
54
|
background: transparent;
|
|
56
55
|
cursor: pointer;
|
|
57
|
-
|
|
56
|
+
|
|
57
|
+
/* Focus ring — drawn on the overlay so it paints above positioned children (e.g. `.panel`). The offset pushes it out over the card border, so it sits fully inside the card edge. */
|
|
58
|
+
outline: var(--card-focus-border, var(--stroke-focus) solid var(--color-focus));
|
|
59
|
+
outline-offset: calc(var(--card-stroke, 0px) - var(--stroke-focus));
|
|
58
60
|
|
|
59
61
|
/* Typography — hide the link's text visually but keep it in the accessibility tree. */
|
|
60
62
|
color: transparent;
|
|
@@ -67,9 +69,9 @@
|
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
@layer overrides {
|
|
70
|
-
.card {
|
|
71
|
-
/* Show the focus ring only while the
|
|
72
|
-
&:not(:
|
|
72
|
+
.card > .overlay {
|
|
73
|
+
/* Show the focus ring only while the overlay is keyboard-focused. */
|
|
74
|
+
&:not(:focus-visible) {
|
|
73
75
|
outline-color: transparent;
|
|
74
76
|
}
|
|
75
77
|
}
|