@hattisar/design-tokens 0.3.11 → 0.3.12
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/tokens.css +48 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hattisar/design-tokens",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "Shared design tokens (colors, type, radius, spacing, motion) and base primitives (reset, buttons, inputs, cards, modals, auth shell) for every Hattisar frontend.",
|
|
5
5
|
"main": "tokens.css",
|
|
6
6
|
"files": [
|
package/tokens.css
CHANGED
|
@@ -352,17 +352,35 @@
|
|
|
352
352
|
--sidebar-width-collapsed: 64px;
|
|
353
353
|
--sidebar-height: calc(100vh - var(--header-height));
|
|
354
354
|
|
|
355
|
-
/*
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
355
|
+
/* Two widths, because a page is one of two things.
|
|
356
|
+
Measured against Shopify at 1920: their product *list* runs
|
|
357
|
+
256→1888, effectively the full area, and their product *form* runs
|
|
358
|
+
605→1554 — 950px, centred, with 365px of gap either side. A table
|
|
359
|
+
wants every pixel; a form wants a column you can read across
|
|
360
|
+
without your eyes travelling.
|
|
361
|
+
|
|
362
|
+
There were three before — 800 for plain field lists, 1152 for
|
|
363
|
+
forms with a sidebar, 1600 for line-item documents — and they were
|
|
364
|
+
flush left. Three caps left-aligned is the worst of both: the
|
|
365
|
+
right edge moves between pages *and* so does the amount of empty
|
|
366
|
+
space, so the app reads as if it cannot decide how wide it is.
|
|
367
|
+
|
|
368
|
+
--page-width-content is 1152 rather than Shopify's 950 for a
|
|
369
|
+
reason that is ours and not theirs: their product form has no
|
|
370
|
+
line-item grid and every one of our documents does. A sales order
|
|
371
|
+
at 950 would scroll its item table sideways on every visit, and
|
|
372
|
+
trading a horizontal scroll on the busiest form in the app for
|
|
373
|
+
200px of symmetry is a bad deal. */
|
|
374
|
+
--page-width-content: 1152px;
|
|
375
|
+
|
|
376
|
+
/* Kept as aliases: several rules and a handful of pages still name
|
|
377
|
+
them, and pointing all three at the same value is what makes the
|
|
378
|
+
consolidation a one-line change rather than a sweep through forty
|
|
379
|
+
files. They resolve to the same width now — the modifier classes
|
|
380
|
+
are inert. */
|
|
381
|
+
--page-width-small: var(--page-width-content);
|
|
382
|
+
--page-width-medium: var(--page-width-content);
|
|
383
|
+
--page-width-large: var(--page-width-content);
|
|
366
384
|
|
|
367
385
|
color-scheme: light dark;
|
|
368
386
|
}
|
|
@@ -1299,37 +1317,28 @@ input[type="radio"] {
|
|
|
1299
1317
|
margin-bottom: 12px;
|
|
1300
1318
|
}
|
|
1301
1319
|
|
|
1302
|
-
/* Capped
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
left edge away from both of those, and away from itself between a
|
|
1309
|
-
wide table and a two-field form, reading as content jumping around
|
|
1310
|
-
from page to page instead of a page that's simply narrower. */
|
|
1311
|
-
.record-form-layout > form {
|
|
1312
|
-
flex: 1;
|
|
1313
|
-
min-width: 0;
|
|
1314
|
-
max-width: var(--page-width-small);
|
|
1315
|
-
}
|
|
1320
|
+
/* Capped and centred, one width for every form.
|
|
1321
|
+
This reverses the note that stood here, so the reasoning it replaces
|
|
1322
|
+
is worth keeping rather than deleting: centring was rejected before
|
|
1323
|
+
because it drifted the form's left edge away from the page's own
|
|
1324
|
+
title and away from the list pages' left edge, so content appeared
|
|
1325
|
+
to jump around between pages.
|
|
1316
1326
|
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
max-width: var(--page-width-medium);
|
|
1323
|
-
}
|
|
1327
|
+
That was true, and it was true *because there were three widths*. A
|
|
1328
|
+
centred box only moves if the box keeps changing size — with one
|
|
1329
|
+
width the left edge is the same on every form in the app, which is
|
|
1330
|
+
the thing the old note actually wanted. The page title moves with
|
|
1331
|
+
it, so the two stay aligned.
|
|
1324
1332
|
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
instead, still full-bleed on any normal screen. Flush left, same
|
|
1330
|
-
reasoning as .record-form-layout > form above. */
|
|
1333
|
+
Tables are untouched and stay full width, which is what Shopify does
|
|
1334
|
+
and what a table wants. */
|
|
1335
|
+
.record-form-layout > form,
|
|
1336
|
+
.record-form-layout.medium-form-layout > form,
|
|
1331
1337
|
.wide-form-layout > form {
|
|
1332
|
-
|
|
1338
|
+
flex: 1;
|
|
1339
|
+
min-width: 0;
|
|
1340
|
+
max-width: var(--page-width-content);
|
|
1341
|
+
margin-inline: auto;
|
|
1333
1342
|
}
|
|
1334
1343
|
|
|
1335
1344
|
.wide-form-layout .party-form-columns {
|