@dustin-riley/design 0.2.0 → 0.2.2
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/DESIGN.md +1 -1
- package/package.json +1 -1
- package/src/core.css +5 -4
- package/src/tokens.css +8 -6
package/DESIGN.md
CHANGED
|
@@ -148,7 +148,7 @@ For framework motion (Framer Motion etc.), use spring presets:
|
|
|
148
148
|
| Hover (cards, buttons) | `translateY(-1px)` + elevation bump `sm → md`. Color shift secondary. |
|
|
149
149
|
| Hover (text links) | Color shift only — no underline toggling. |
|
|
150
150
|
| Press / active | `scale(0.97)` snappy spring. Buttons may shift to `--ds-primary-pressed`. Elevation drops to resting. |
|
|
151
|
-
| Focus | `--ds-focus-ring` (2px primary at 40% opacity, 2px offset). Always visible. **Never `outline: none` without a replacement** — wire `:focus-visible` to the ring globally. |
|
|
151
|
+
| Focus | `--ds-focus-ring-color` outline (2px primary at 40% opacity, 2px offset; outline follows the element shape). Always visible. **Never `outline: none` without a replacement** — wire `:focus-visible` to the ring globally. |
|
|
152
152
|
| Disabled | 40% opacity, no pointer events, no hover lift. Never communicated by color alone. |
|
|
153
153
|
|
|
154
154
|
---
|
package/package.json
CHANGED
package/src/core.css
CHANGED
|
@@ -281,10 +281,11 @@ h6,
|
|
|
281
281
|
font-weight: 500;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
284
|
+
/* No global `a` rule. <a> is both chrome (nav/brand/footer) and content,
|
|
285
|
+
so any system-wide color/decoration is wrong somewhere. Links inherit
|
|
286
|
+
text color via Tailwind Preflight; link color/underline is an
|
|
287
|
+
intentional component or prose decision (article-body links, prose
|
|
288
|
+
links, active nav, etc. opt into var(--ds-link)). */
|
|
288
289
|
|
|
289
290
|
:where(code, pre, kbd, samp) {
|
|
290
291
|
font-family: var(--ds-font-mono);
|
package/src/tokens.css
CHANGED
|
@@ -102,15 +102,17 @@
|
|
|
102
102
|
--ds-duration-slow: 280ms;
|
|
103
103
|
--ds-ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
104
104
|
|
|
105
|
-
/* Focus ring
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
/* Focus ring — 2px primary @ 40% opacity, 2px offset (per DESIGN.md).
|
|
106
|
+
Delivered as an `outline` so it stays tight (no soft halo on wide
|
|
107
|
+
inputs) and follows each element's own border-radius. Do NOT switch
|
|
108
|
+
to box-shadow or force a border-radius here — that produced an
|
|
109
|
+
oversized glow + squared-off corners (see docs/SPEC.md addendum 6). */
|
|
110
|
+
--ds-focus-ring-color: rgba(184, 84, 28, 0.4);
|
|
108
111
|
}
|
|
109
112
|
|
|
110
113
|
:focus-visible {
|
|
111
|
-
outline:
|
|
112
|
-
|
|
113
|
-
border-radius: var(--ds-radius-sm);
|
|
114
|
+
outline: 2px solid var(--ds-focus-ring-color);
|
|
115
|
+
outline-offset: 2px;
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
/* Opinionated base element resets (link underline, code boxing,
|