@plus234feed/ds 0.11.0 → 0.13.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/components.css +52 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plus234feed/ds",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Plus234Feed design system. Editorial tokens, type scale and components for a news intelligence platform: newspaper hierarchy, accessible colour in both themes, one component per job.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -292,6 +292,33 @@
292
292
  .p234-delta--cost[data-direction="up"] { color: var(--p234-color-data-down); }
293
293
  .p234-delta--cost[data-direction="down"] { color: var(--p234-color-data-up); }
294
294
 
295
+ /* --- split ------------------------------------------------------------
296
+ A column of content with a rail beside it: a table and its related links,
297
+ an article and its filings, a chart and its figures.
298
+
299
+ Written by hand on four pages before this existed, each time as an auto-fit
300
+ grid, and each time the wide thing inside it pushed its own track past its
301
+ share and ran under the rail. An auto-fit track sizes from its contents,
302
+ and `min-width: 0` on the child is not enough to stop that: the track
303
+ itself has to be told it may shrink, which is what minmax(0, 1fr) says.
304
+
305
+ One column until there is room for two, so a rail never becomes a sliver. */
306
+ .p234-split {
307
+ display: grid;
308
+ gap: var(--p234-space-8);
309
+ align-items: start;
310
+ }
311
+ /* Both halves may shrink. Without this a table or a pre refuses to, and
312
+ whatever sits beside it is covered. */
313
+ .p234-split > * { min-width: 0; }
314
+
315
+ @media (min-width: 60rem) {
316
+ .p234-split { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); }
317
+ /* Equal halves, for two lists of the same kind rather than content plus a
318
+ rail: top gainers beside top losers. */
319
+ .p234-split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
320
+ }
321
+
295
322
  /* --- tile row ----------------------------------------------------------
296
323
  The grid a row of tiles sits in. Every page that showed figures was
297
324
  writing this inline, with a different minimum each time, and the counts
@@ -1455,10 +1482,31 @@ textarea.p234-field__control {
1455
1482
  color: var(--p234-color-ink);
1456
1483
  }
1457
1484
 
1458
- /* In a narrow column the three parts of a row compete for the same line and
1459
- the name truncates to nothing. Below this width the detail moves under the
1460
- name and the figure keeps the right edge, which is the shape a list of
1461
- movers wants when two of them sit side by side. */
1485
+ /* Stacked: the detail moves under the name and the figure keeps the right
1486
+ edge, spanning both lines.
1487
+ *
1488
+ * Two things ask for it. A narrow column, where the three parts of a row
1489
+ * compete for one line until the name truncates to nothing, which a container
1490
+ * query handles on its own. And a page that wants it at any width: in a long
1491
+ * list of companies the code trailing the name lands at a different place on
1492
+ * every row, and a column of codes under the names is far easier to scan.
1493
+ *
1494
+ * The declarations are written twice because a container query cannot share a
1495
+ * rule block with a plain selector. They must stay identical. */
1496
+ .p234-directory--stacked .p234-directory__row {
1497
+ display: grid;
1498
+ grid-template-columns: 1fr auto;
1499
+ column-gap: var(--p234-space-4);
1500
+ align-items: baseline;
1501
+ }
1502
+ .p234-directory--stacked .p234-directory__name { grid-area: 1 / 1; }
1503
+ .p234-directory--stacked .p234-directory__detail { grid-area: 2 / 1; }
1504
+ .p234-directory--stacked .p234-directory__value {
1505
+ grid-area: 1 / 2 / span 2;
1506
+ margin-left: 0;
1507
+ align-self: center;
1508
+ }
1509
+
1462
1510
  @container (max-width: 26rem) {
1463
1511
  .p234-directory__row {
1464
1512
  display: grid;