@crewlethq/tokens 0.36.0 → 0.37.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/README.md +4 -0
- package/dist/css/base.css +10 -0
- package/dist/css/tokens.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,6 +45,10 @@ const accent = color.brand.accent;
|
|
|
45
45
|
CSS variables follow Style Dictionary's `--{group}-{path}` convention,
|
|
46
46
|
for example `var(--color-brand-accent)` or `var(--spacing-4)`.
|
|
47
47
|
|
|
48
|
+
## Changed in 0.37.1: focus handed back
|
|
49
|
+
|
|
50
|
+
The baseline keeps the ring off an element marked `data-crewlet-focus-returned` (by `@crewlethq/ui`'s `returnFocus`) while the root says the last move was a pointer's (`data-crewlet-focus="pointer"`). A trigger focused again when its palette closes matched `:focus-visible` because the palette's field did, so a click and an Escape left it ringed. The outline turns transparent rather than going, so forced colors still paints one.
|
|
51
|
+
|
|
48
52
|
## Changed in 0.36.0: a chosen option's edge and fill
|
|
49
53
|
|
|
50
54
|
Two tokens name what a CHOSEN option draws (the template, theme, agent or starting layout a reader picked, the slide being edited), so a page of options is calm and the focus ring is the only accent line on it.
|
package/dist/css/base.css
CHANGED
|
@@ -149,6 +149,16 @@ img {
|
|
|
149
149
|
border-radius: var(--radius-xs);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
/* Focus handed back by script (a trigger after its palette or menu closes,
|
|
153
|
+
marked by @crewlethq/ui's returnFocus) draws no ring while the last move
|
|
154
|
+
was a pointer's. The browser rings it because the field it left always
|
|
155
|
+
matched :focus-visible, so a palette opened with a click and closed with
|
|
156
|
+
Escape left its trigger ringed. The outline stays, transparent, so forced
|
|
157
|
+
colors still paints one. */
|
|
158
|
+
:root[data-crewlet-focus='pointer'] [data-crewlet-focus-returned]:focus-visible {
|
|
159
|
+
outline-color: transparent;
|
|
160
|
+
}
|
|
161
|
+
|
|
152
162
|
::selection {
|
|
153
163
|
background: var(--color-brand-accent-soft);
|
|
154
164
|
}
|
package/dist/css/tokens.css
CHANGED
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
--z-index-popover: 10000; /** Floating panels portaled to the body (Select menus, Popover, date pickers). Above modal because they are routinely opened from inside a dialog, and a panel under the backdrop is hidden and swallows clicks. */
|
|
238
238
|
--z-index-toast: 10001; /** Top of the stack. A toast reports the outcome of what somebody just did, often in a dialog or from a menu opened inside one, so it sits above both. */
|
|
239
239
|
--color-surface-selected: var(--color-brand-accent-soft); /** The fill behind a CHOSEN option: the template, theme, agent or slide a reader picked. An alias of the accent's soft fill, so the meaning has a name of its own and follows the accent in every palette. Its edge is --color-border-selected, which the build derives as the accent at 0.6 (the full accent in a high-contrast theme): a tint, mixed toward whatever ground it lands on, so a page of options never carries a second focus ring. Neither is ever the state's only cue, and neither is ever the focus indicator, which stays --color-focus at 2px on :focus-visible. */
|
|
240
|
-
--color-artifact-kind-doc: var(--color-node-blue); /** The hue an artifact kind is drawn in wherever its kind is pictured: the illustration on a
|
|
240
|
+
--color-artifact-kind-doc: var(--color-node-blue); /** The hue an artifact kind is drawn in wherever its kind is pictured: the illustration on a "Start a new artifact" tile and the ground a gallery card shows before its live preview arrives. Each kind is an ALIAS of one node hue (doc blue, slides amber, design purple, dashboard cyan, HTML rose, sheet green), so every theme repaints it with no value of its own, and the Ink, Fill and Line steps follow the node hue's own derived steps. A kind's hue is identity and never state: the kind's name is always drawn beside it. */
|
|
241
241
|
--color-artifact-kind-doc-ink: var(--color-node-blue-ink);
|
|
242
242
|
--color-artifact-kind-doc-fill: var(--color-node-blue-fill);
|
|
243
243
|
--color-artifact-kind-doc-line: var(--color-node-blue-line);
|