@pretable/ui 0.18.0 → 0.20.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.
- package/grid.css +226 -38
- package/package.json +1 -1
- package/themes/excel.css +7 -1
- package/themes/material.css +6 -2
- package/themes/pretable.css +65 -43
package/grid.css
CHANGED
|
@@ -45,27 +45,45 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/* Outer viewport (scrollable container).
|
|
48
|
-
The
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
The frame is a token, not a literal: the house theme is frameless and
|
|
49
|
+
sets --pretable-frame to 0, the compatibility skins set it to a 1px line.
|
|
50
|
+
The container's corners are their own token too: --pretable-radius-frame
|
|
51
|
+
rounds only the container sites (this viewport, the tool-layout wrapper,
|
|
52
|
+
the group panel, the error strip), so a frameless theme can square the
|
|
53
|
+
container without squaring the menus, popovers and chips that read
|
|
54
|
+
--pretable-radius. --pretable-rule-strong no longer takes part here — its
|
|
55
|
+
remaining consumers are the select listbox, the date popover and the
|
|
56
|
+
badge. */
|
|
53
57
|
:where([data-pretable-scroll-viewport]) {
|
|
54
58
|
background: var(--pretable-bg-grid);
|
|
55
|
-
border:
|
|
56
|
-
border-radius: var(--pretable-radius);
|
|
59
|
+
border: var(--pretable-frame);
|
|
60
|
+
border-radius: var(--pretable-radius-frame);
|
|
57
61
|
box-shadow: var(--pretable-shadow-card);
|
|
58
62
|
font-family: var(--pretable-font-sans);
|
|
59
63
|
color: var(--pretable-text-cell);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
|
-
/* Header row
|
|
66
|
+
/* Header row. The resting underline is decorative and reads
|
|
67
|
+
--pretable-rule-header; the load-bearing seam against rows scrolling
|
|
68
|
+
underneath is the shadow keyed on [data-pretable-scrolled] below. */
|
|
63
69
|
:where([data-pretable-header-row]) {
|
|
64
70
|
background: var(--pretable-bg-header);
|
|
65
|
-
border-bottom: 1px solid var(--pretable-rule-
|
|
71
|
+
border-bottom: 1px solid var(--pretable-rule-header);
|
|
66
72
|
height: var(--pretable-header-height);
|
|
67
73
|
}
|
|
68
74
|
|
|
75
|
+
/* The sticky header earns its seam only once rows pass under it. The
|
|
76
|
+
surface sets [data-pretable-scrolled] on the viewport at scrollTop > 0;
|
|
77
|
+
the header's stacking comes from the surface's inline sticky style, so
|
|
78
|
+
the shadow paints over the first row without this rule saying anything
|
|
79
|
+
about z-index. */
|
|
80
|
+
:where(
|
|
81
|
+
[data-pretable-scroll-viewport][data-pretable-scrolled]
|
|
82
|
+
[data-pretable-header-row]
|
|
83
|
+
) {
|
|
84
|
+
box-shadow: var(--pretable-shadow-header);
|
|
85
|
+
}
|
|
86
|
+
|
|
69
87
|
:where([data-pretable-header-cell]) {
|
|
70
88
|
display: flex;
|
|
71
89
|
align-items: center;
|
|
@@ -229,15 +247,15 @@
|
|
|
229
247
|
cursor: pointer;
|
|
230
248
|
}
|
|
231
249
|
|
|
232
|
-
:where([data-pretable-option]:hover) {
|
|
250
|
+
:where([data-pretable-option]:hover:not([aria-disabled="true"])) {
|
|
233
251
|
background: var(--pretable-bg-hover);
|
|
234
252
|
}
|
|
235
253
|
|
|
236
|
-
/* The roving highlight: keyboard navigation's `data-active`, painted like
|
|
254
|
+
/* The roving highlight: keyboard navigation's `data-pretable-active`, painted like
|
|
237
255
|
a hover. DECLARED BEFORE the selected rule on purpose — an option that
|
|
238
256
|
is both active and committed should read as SELECTED, and at equal
|
|
239
257
|
(0,0,0) specificity source order is what decides that. */
|
|
240
|
-
:where([data-pretable-option][data-active]) {
|
|
258
|
+
:where([data-pretable-option][data-pretable-active]) {
|
|
241
259
|
background: var(--pretable-bg-hover);
|
|
242
260
|
}
|
|
243
261
|
|
|
@@ -246,6 +264,13 @@
|
|
|
246
264
|
color: var(--pretable-text-selected);
|
|
247
265
|
}
|
|
248
266
|
|
|
267
|
+
/* Disabled may also be committed. Keep its selection fill, but let the
|
|
268
|
+
disabled ink and cursor win after the selected rule. */
|
|
269
|
+
:where([data-pretable-option][aria-disabled="true"]) {
|
|
270
|
+
color: var(--pretable-text-dim);
|
|
271
|
+
cursor: default;
|
|
272
|
+
}
|
|
273
|
+
|
|
249
274
|
/* ---- Kit components: text input --------------------------------------
|
|
250
275
|
The native input in the grid's box: the same rule border, grid surface
|
|
251
276
|
and cell ink the select trigger draws, so a field and the picker beside
|
|
@@ -262,6 +287,16 @@
|
|
|
262
287
|
font: inherit;
|
|
263
288
|
}
|
|
264
289
|
|
|
290
|
+
:where([data-pretable-textarea]) {
|
|
291
|
+
box-sizing: border-box;
|
|
292
|
+
padding-inline: 6px;
|
|
293
|
+
border: 1px solid var(--pretable-rule);
|
|
294
|
+
border-radius: var(--pretable-radius-control);
|
|
295
|
+
background: var(--pretable-bg-grid);
|
|
296
|
+
color: var(--pretable-text-cell);
|
|
297
|
+
font: inherit;
|
|
298
|
+
}
|
|
299
|
+
|
|
265
300
|
/* ---- Kit components: checkbox ----------------------------------------
|
|
266
301
|
The 16px square every checkbox in the grid is — the row-select cell, the
|
|
267
302
|
header select-all, the boolean cell, the column toggle, the checklists
|
|
@@ -1182,9 +1217,9 @@
|
|
|
1182
1217
|
gap: var(--pretable-cell-padding-x);
|
|
1183
1218
|
padding: 0 var(--pretable-cell-padding-x);
|
|
1184
1219
|
background: var(--pretable-bg-toolbar);
|
|
1185
|
-
border:
|
|
1220
|
+
border: var(--pretable-frame);
|
|
1186
1221
|
border-bottom: 0;
|
|
1187
|
-
border-radius: var(--pretable-radius) var(--pretable-radius) 0 0;
|
|
1222
|
+
border-radius: var(--pretable-radius-frame) var(--pretable-radius-frame) 0 0;
|
|
1188
1223
|
color: var(--pretable-text-header);
|
|
1189
1224
|
font-family: var(--pretable-font-sans);
|
|
1190
1225
|
font-size: var(--pretable-font-size-header);
|
|
@@ -1409,6 +1444,7 @@
|
|
|
1409
1444
|
/* Portaled into <body> — see the filter menu above. */
|
|
1410
1445
|
font-family: var(--pretable-font-sans);
|
|
1411
1446
|
font-size: var(--pretable-font-size-cell);
|
|
1447
|
+
line-height: 1.4;
|
|
1412
1448
|
color: var(--pretable-text-cell);
|
|
1413
1449
|
}
|
|
1414
1450
|
|
|
@@ -1420,7 +1456,10 @@
|
|
|
1420
1456
|
padding-bottom: 6px;
|
|
1421
1457
|
}
|
|
1422
1458
|
|
|
1423
|
-
:where(
|
|
1459
|
+
:where(
|
|
1460
|
+
[data-pretable-date-header]
|
|
1461
|
+
:is([data-pretable-date-previous-month], [data-pretable-date-next-month])
|
|
1462
|
+
) {
|
|
1424
1463
|
border: none;
|
|
1425
1464
|
background: none;
|
|
1426
1465
|
color: var(--pretable-text-header);
|
|
@@ -1428,13 +1467,25 @@
|
|
|
1428
1467
|
padding: 0 6px;
|
|
1429
1468
|
}
|
|
1430
1469
|
|
|
1431
|
-
:where(
|
|
1470
|
+
:where(
|
|
1471
|
+
[data-pretable-date-header]
|
|
1472
|
+
:is(
|
|
1473
|
+
[data-pretable-date-previous-month],
|
|
1474
|
+
[data-pretable-date-next-month]
|
|
1475
|
+
):hover:not(:disabled)
|
|
1476
|
+
) {
|
|
1432
1477
|
color: var(--pretable-accent);
|
|
1433
1478
|
}
|
|
1434
1479
|
/* The month steppers disable at the calendar's min/max month. Without this
|
|
1435
1480
|
they kept the enabled colour, the pointer cursor and the hover accent —
|
|
1436
1481
|
the same defect the menu items had. */
|
|
1437
|
-
:where(
|
|
1482
|
+
:where(
|
|
1483
|
+
[data-pretable-date-header]
|
|
1484
|
+
:is(
|
|
1485
|
+
[data-pretable-date-previous-month],
|
|
1486
|
+
[data-pretable-date-next-month]
|
|
1487
|
+
):disabled
|
|
1488
|
+
) {
|
|
1438
1489
|
color: var(--pretable-text-dim);
|
|
1439
1490
|
cursor: default;
|
|
1440
1491
|
}
|
|
@@ -1457,7 +1508,7 @@
|
|
|
1457
1508
|
cursor: pointer;
|
|
1458
1509
|
}
|
|
1459
1510
|
|
|
1460
|
-
:where([data-pretable-date-day]:hover) {
|
|
1511
|
+
:where([data-pretable-date-day]:hover:not([aria-disabled="true"])) {
|
|
1461
1512
|
background: var(--pretable-bg-hover);
|
|
1462
1513
|
}
|
|
1463
1514
|
|
|
@@ -1474,6 +1525,15 @@
|
|
|
1474
1525
|
color: var(--pretable-text-selected);
|
|
1475
1526
|
}
|
|
1476
1527
|
|
|
1528
|
+
:where([data-pretable-date-day][data-pretable-date-active]) {
|
|
1529
|
+
outline: 2px solid var(--pretable-focus-ring);
|
|
1530
|
+
outline-offset: -2px;
|
|
1531
|
+
}
|
|
1532
|
+
:where([data-pretable-date-day][aria-disabled="true"]) {
|
|
1533
|
+
color: var(--pretable-text-dim);
|
|
1534
|
+
cursor: default;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1477
1537
|
/* Tooltip / popover */
|
|
1478
1538
|
:where([data-pretable-popover]) {
|
|
1479
1539
|
background: var(--pretable-bg-tooltip);
|
|
@@ -1482,12 +1542,38 @@
|
|
|
1482
1542
|
border-radius: var(--pretable-radius);
|
|
1483
1543
|
}
|
|
1484
1544
|
|
|
1545
|
+
/* Validation messages occupy their own line; the field keeps the full
|
|
1546
|
+
column width instead of shrinking beside the error text. */
|
|
1547
|
+
:where(
|
|
1548
|
+
[data-pretable-cell][data-pretable-edit-status]:has(.pretable-cell-editor)
|
|
1549
|
+
) {
|
|
1550
|
+
flex-direction: column;
|
|
1551
|
+
align-items: stretch;
|
|
1552
|
+
justify-content: flex-start;
|
|
1553
|
+
padding: 0;
|
|
1554
|
+
}
|
|
1555
|
+
:where(
|
|
1556
|
+
[data-pretable-cell][data-pretable-edit-status]
|
|
1557
|
+
> :is(
|
|
1558
|
+
[data-pretable-number-editor],
|
|
1559
|
+
[data-pretable-enum-editor],
|
|
1560
|
+
[data-pretable-date-editor]
|
|
1561
|
+
)
|
|
1562
|
+
) {
|
|
1563
|
+
flex: 1;
|
|
1564
|
+
min-height: 0;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1485
1567
|
/* Cell editor (inline editing) */
|
|
1486
1568
|
:where(.pretable-cell-editor) {
|
|
1569
|
+
border-radius: 0;
|
|
1570
|
+
min-height: 0;
|
|
1571
|
+
min-width: 0;
|
|
1572
|
+
flex: 1;
|
|
1487
1573
|
width: 100%;
|
|
1488
1574
|
height: 100%;
|
|
1489
1575
|
box-sizing: border-box;
|
|
1490
|
-
padding:
|
|
1576
|
+
padding: 2px var(--pretable-cell-padding-x);
|
|
1491
1577
|
border: none;
|
|
1492
1578
|
outline: 2px solid var(--pretable-focus-ring);
|
|
1493
1579
|
outline-offset: -2px;
|
|
@@ -1534,7 +1620,10 @@
|
|
|
1534
1620
|
justify-content: center;
|
|
1535
1621
|
}
|
|
1536
1622
|
|
|
1537
|
-
:where(
|
|
1623
|
+
:where(
|
|
1624
|
+
[data-pretable-number-steppers]
|
|
1625
|
+
:is([data-pretable-number-increment], [data-pretable-number-decrement])
|
|
1626
|
+
) {
|
|
1538
1627
|
border: none;
|
|
1539
1628
|
background: var(--pretable-bg-header);
|
|
1540
1629
|
color: var(--pretable-text-header);
|
|
@@ -1544,11 +1633,27 @@
|
|
|
1544
1633
|
cursor: pointer;
|
|
1545
1634
|
}
|
|
1546
1635
|
|
|
1547
|
-
:where(
|
|
1636
|
+
:where(
|
|
1637
|
+
[data-pretable-number-steppers]
|
|
1638
|
+
:is(
|
|
1639
|
+
[data-pretable-number-increment],
|
|
1640
|
+
[data-pretable-number-decrement]
|
|
1641
|
+
):hover:not(:disabled)
|
|
1642
|
+
) {
|
|
1548
1643
|
background: var(--pretable-bg-hover);
|
|
1549
1644
|
}
|
|
1550
1645
|
|
|
1646
|
+
/* Preserve room for an ISO date and caret in narrow date columns. */
|
|
1647
|
+
:where([data-pretable-date-editor] .pretable-cell-editor) {
|
|
1648
|
+
padding-inline: 4px;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1551
1651
|
:where([data-pretable-edit-error]) {
|
|
1652
|
+
white-space: nowrap;
|
|
1653
|
+
flex: none;
|
|
1654
|
+
overflow: hidden;
|
|
1655
|
+
text-overflow: ellipsis;
|
|
1656
|
+
line-height: 1.2;
|
|
1552
1657
|
margin-top: 2px;
|
|
1553
1658
|
color: var(--pretable-text-error);
|
|
1554
1659
|
font-family: var(--pretable-font-sans);
|
|
@@ -1578,12 +1683,12 @@
|
|
|
1578
1683
|
}
|
|
1579
1684
|
|
|
1580
1685
|
/* The strip is a card stacked on top of the box below it, so it carries that
|
|
1581
|
-
box's border and rounds only its own top
|
|
1582
|
-
the seam being drawn twice. */
|
|
1686
|
+
box's border and rounds only its own top, with the container's radius
|
|
1687
|
+
token. `border-bottom: 0` is what stops the seam being drawn twice. */
|
|
1583
1688
|
:where([data-pretable-body-state="error-strip"]) {
|
|
1584
|
-
border:
|
|
1689
|
+
border: var(--pretable-frame);
|
|
1585
1690
|
border-bottom: 0;
|
|
1586
|
-
border-radius: var(--pretable-radius) var(--pretable-radius) 0 0;
|
|
1691
|
+
border-radius: var(--pretable-radius-frame) var(--pretable-radius-frame) 0 0;
|
|
1587
1692
|
}
|
|
1588
1693
|
|
|
1589
1694
|
/* …and the box below squares the two corners that now meet in the middle,
|
|
@@ -1611,8 +1716,8 @@
|
|
|
1611
1716
|
This is the same border redistribution the group-panel wrapper performs
|
|
1612
1717
|
vertically, one axis over. */
|
|
1613
1718
|
:where([data-pretable-tool-layout]) {
|
|
1614
|
-
border:
|
|
1615
|
-
border-radius: var(--pretable-radius);
|
|
1719
|
+
border: var(--pretable-frame);
|
|
1720
|
+
border-radius: var(--pretable-radius-frame);
|
|
1616
1721
|
box-shadow: var(--pretable-shadow-card);
|
|
1617
1722
|
/* The children keep square corners and the wrapper's radius clips them.
|
|
1618
1723
|
Safe to clip: every floating grid child (menus, editors, the reorder
|
|
@@ -1631,7 +1736,7 @@
|
|
|
1631
1736
|
:where([data-pretable-body-state="error-strip"]) {
|
|
1632
1737
|
border: 0;
|
|
1633
1738
|
border-radius: 0;
|
|
1634
|
-
border-bottom: 1px solid var(--pretable-rule-
|
|
1739
|
+
border-bottom: 1px solid var(--pretable-rule-header);
|
|
1635
1740
|
}
|
|
1636
1741
|
|
|
1637
1742
|
/* A rail of section tabs at the grid's right edge plus a full-height pane.
|
|
@@ -2208,11 +2313,16 @@
|
|
|
2208
2313
|
[data-pretable-icon-button]:focus-visible,
|
|
2209
2314
|
[data-pretable-select]:focus-visible,
|
|
2210
2315
|
[data-pretable-text-input]:focus-visible,
|
|
2316
|
+
[data-pretable-textarea]:focus-visible,
|
|
2211
2317
|
[data-pretable-checkbox]:focus-visible
|
|
2212
2318
|
) {
|
|
2213
2319
|
outline: 2px solid var(--pretable-focus-ring);
|
|
2214
2320
|
outline-offset: -2px;
|
|
2215
2321
|
}
|
|
2322
|
+
/* Editor errors win over the generic focused-field shorthand. */
|
|
2323
|
+
:where(.pretable-cell-editor[aria-invalid="true"]) {
|
|
2324
|
+
outline-color: var(--pretable-text-error);
|
|
2325
|
+
}
|
|
2216
2326
|
/* A checkbox rings OUTSIDE its box, alone among the kit controls. The
|
|
2217
2327
|
square is 16px and paints to its own edge — border, fill and glyph all
|
|
2218
2328
|
the way out — so the inset ring above would land ON the box rather than
|
|
@@ -2232,21 +2342,20 @@
|
|
|
2232
2342
|
[data-pretable-button]:disabled,
|
|
2233
2343
|
[data-pretable-icon-button]:disabled,
|
|
2234
2344
|
[data-pretable-select]:disabled,
|
|
2235
|
-
[data-pretable-text-input]:disabled
|
|
2345
|
+
[data-pretable-text-input]:disabled,
|
|
2346
|
+
[data-pretable-textarea]:disabled
|
|
2236
2347
|
) {
|
|
2237
2348
|
color: var(--pretable-text-dim);
|
|
2238
2349
|
cursor: default;
|
|
2239
2350
|
}
|
|
2240
|
-
/*
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
1.9:1 and the tick all but vanishes. A read-only boolean column renders
|
|
2244
|
-
its cell control disabled on EVERY row, so that would be every tick in
|
|
2245
|
-
the column. A checkbox's disabled look is its own tokens (border, fill,
|
|
2246
|
-
and the shared opacity/forced-colors treatment), never text ink; all this
|
|
2247
|
-
rule owes is the pointer. Declaring no `color` here also leaves the
|
|
2248
|
-
checked rule above as the last word on the glyph. */
|
|
2351
|
+
/* A disabled checkbox keeps a legible tick on the grid surface. Changing
|
|
2352
|
+
fill together with ink avoids dim ink on an accent fill. A dashed border
|
|
2353
|
+
distinguishes the unchecked disabled state without relying on opacity. */
|
|
2249
2354
|
:where([data-pretable-checkbox]:disabled) {
|
|
2355
|
+
background: var(--pretable-bg-grid);
|
|
2356
|
+
color: var(--pretable-text-dim);
|
|
2357
|
+
border-color: var(--pretable-text-dim);
|
|
2358
|
+
border-style: dashed;
|
|
2250
2359
|
cursor: default;
|
|
2251
2360
|
}
|
|
2252
2361
|
|
|
@@ -2457,6 +2566,7 @@
|
|
|
2457
2566
|
[data-pretable-icon-button]:disabled,
|
|
2458
2567
|
[data-pretable-select]:disabled,
|
|
2459
2568
|
[data-pretable-text-input]:disabled,
|
|
2569
|
+
[data-pretable-textarea]:disabled,
|
|
2460
2570
|
[data-pretable-checkbox]:disabled
|
|
2461
2571
|
) {
|
|
2462
2572
|
color: GrayText;
|
|
@@ -2481,8 +2591,86 @@
|
|
|
2481
2591
|
:where([data-pretable-checkbox][aria-checked="mixed"]) {
|
|
2482
2592
|
forced-color-adjust: none;
|
|
2483
2593
|
background-color: Highlight;
|
|
2594
|
+
border-color: Highlight;
|
|
2595
|
+
outline-color: CanvasText;
|
|
2484
2596
|
color: HighlightText;
|
|
2485
2597
|
}
|
|
2598
|
+
/* Disabled wins over both committed selection and checked/mixed state.
|
|
2599
|
+
Canvas/GrayText is the platform disabled pair. The dashed selected
|
|
2600
|
+
outline preserves the committed mark without using an enabled fill. */
|
|
2601
|
+
:where([data-pretable-option][aria-disabled="true"]) {
|
|
2602
|
+
forced-color-adjust: none;
|
|
2603
|
+
background-color: Canvas;
|
|
2604
|
+
color: GrayText;
|
|
2605
|
+
border-color: GrayText;
|
|
2606
|
+
}
|
|
2607
|
+
:where([data-pretable-option][aria-disabled="true"][aria-selected="true"]) {
|
|
2608
|
+
outline: 1px dashed GrayText;
|
|
2609
|
+
outline-offset: -2px;
|
|
2610
|
+
}
|
|
2611
|
+
/* DOM focus stays on the trigger; this is the visible roving focus.
|
|
2612
|
+
currentColor pairs with Canvas, Highlight, or the disabled surface. */
|
|
2613
|
+
:where([data-pretable-option][data-pretable-active]) {
|
|
2614
|
+
outline: 2px solid currentColor;
|
|
2615
|
+
outline-offset: -2px;
|
|
2616
|
+
}
|
|
2617
|
+
:where([data-pretable-checkbox]:disabled) {
|
|
2618
|
+
forced-color-adjust: none;
|
|
2619
|
+
background-color: Canvas;
|
|
2620
|
+
color: GrayText;
|
|
2621
|
+
border-color: GrayText;
|
|
2622
|
+
outline-color: GrayText;
|
|
2623
|
+
}
|
|
2624
|
+
:where(
|
|
2625
|
+
[data-pretable-number-increment],
|
|
2626
|
+
[data-pretable-number-decrement],
|
|
2627
|
+
[data-pretable-date-previous-month],
|
|
2628
|
+
[data-pretable-date-next-month]
|
|
2629
|
+
) {
|
|
2630
|
+
forced-color-adjust: none;
|
|
2631
|
+
background-color: Canvas;
|
|
2632
|
+
color: CanvasText;
|
|
2633
|
+
border-color: CanvasText;
|
|
2634
|
+
outline-color: CanvasText;
|
|
2635
|
+
}
|
|
2636
|
+
:where(
|
|
2637
|
+
[data-pretable-number-increment]:disabled,
|
|
2638
|
+
[data-pretable-number-decrement]:disabled,
|
|
2639
|
+
[data-pretable-date-previous-month]:disabled,
|
|
2640
|
+
[data-pretable-date-next-month]:disabled
|
|
2641
|
+
) {
|
|
2642
|
+
color: GrayText;
|
|
2643
|
+
}
|
|
2644
|
+
:where([data-pretable-date-day]) {
|
|
2645
|
+
box-shadow: none;
|
|
2646
|
+
forced-color-adjust: none;
|
|
2647
|
+
background-color: Canvas;
|
|
2648
|
+
color: CanvasText;
|
|
2649
|
+
}
|
|
2650
|
+
:where([data-pretable-date-day][aria-selected="true"]) {
|
|
2651
|
+
background-color: Highlight;
|
|
2652
|
+
color: HighlightText;
|
|
2653
|
+
}
|
|
2654
|
+
:where([data-pretable-date-day][data-pretable-date-today]) {
|
|
2655
|
+
text-decoration: underline;
|
|
2656
|
+
}
|
|
2657
|
+
:where([data-pretable-date-day][aria-disabled="true"]) {
|
|
2658
|
+
background-color: Canvas;
|
|
2659
|
+
color: GrayText;
|
|
2660
|
+
}
|
|
2661
|
+
:where([data-pretable-date-day][data-pretable-date-active]) {
|
|
2662
|
+
outline: 2px solid currentColor;
|
|
2663
|
+
outline-offset: -2px;
|
|
2664
|
+
}
|
|
2665
|
+
:where(.pretable-cell-editor) {
|
|
2666
|
+
forced-color-adjust: none;
|
|
2667
|
+
background-color: Canvas;
|
|
2668
|
+
color: CanvasText;
|
|
2669
|
+
outline-color: Highlight;
|
|
2670
|
+
}
|
|
2671
|
+
:where(.pretable-cell-editor[aria-invalid="true"]) {
|
|
2672
|
+
outline: 2px dashed CanvasText;
|
|
2673
|
+
}
|
|
2486
2674
|
}
|
|
2487
2675
|
|
|
2488
2676
|
/* Reduced motion. Every animated declaration in this file is named here:
|
package/package.json
CHANGED
package/themes/excel.css
CHANGED
|
@@ -40,13 +40,18 @@
|
|
|
40
40
|
/* Lines */
|
|
41
41
|
--pretable-rule: #d4d4d4; /* Excel desktop default RGB 211,211,211 */
|
|
42
42
|
--pretable-rule-strong: #a6a6a6;
|
|
43
|
+
--pretable-rule-header: var(
|
|
44
|
+
--pretable-rule-strong
|
|
45
|
+
); /* Excel underlines its header with the frame colour */
|
|
46
|
+
--pretable-frame: 1px solid var(--pretable-rule-strong);
|
|
43
47
|
/* Excel draws the full cage: the vertical divider tracks the horizontal rule.
|
|
44
48
|
A theme that wants horizontal-only separation sets this to `transparent`.
|
|
45
49
|
--pretable-rule-width only governs the per-cell row/column dividers — the
|
|
46
50
|
-strong frame borders and popover/menu/editor borders are still hardcoded 1px. */
|
|
47
51
|
--pretable-rule-vertical: var(--pretable-rule);
|
|
48
52
|
--pretable-rule-width: 1px;
|
|
49
|
-
--pretable-radius: 0; /* Sharp edges — Excel never rounds */
|
|
53
|
+
--pretable-radius-frame: 0; /* Sharp edges — Excel never rounds */
|
|
54
|
+
--pretable-radius: 0;
|
|
50
55
|
--pretable-radius-control: 0; /* Buttons and menu items don't round either */
|
|
51
56
|
|
|
52
57
|
/* State */
|
|
@@ -99,6 +104,7 @@
|
|
|
99
104
|
--pretable-shadow-overlay: 0 4px 12px rgb(0 0 0 / 0.12);
|
|
100
105
|
/* No card shadow: this theme draws a frame instead. pretable.css uses it. */
|
|
101
106
|
--pretable-shadow-card: none;
|
|
107
|
+
--pretable-shadow-header: none; /* The drawn underline is the seam */
|
|
102
108
|
/* The frozen-column edge, as a COLOUR rather than a whole shadow: the right
|
|
103
109
|
edge needs the mirror of the left one's offset, and a single shadow value
|
|
104
110
|
cannot be flipped. grid.css owns the geometry — which is structural — and
|
package/themes/material.css
CHANGED
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
/* Lines */
|
|
46
46
|
--pretable-rule: #cccccc; /* outline-variant — decorative dividers */
|
|
47
47
|
--pretable-rule-strong: #797979; /* outline */
|
|
48
|
+
--pretable-rule-header: var(--pretable-rule-strong);
|
|
49
|
+
--pretable-frame: 1px solid var(--pretable-rule-strong);
|
|
48
50
|
/* Aliased to --pretable-rule so this theme's appearance is unchanged by the
|
|
49
51
|
axis split. Material's own list spec has no vertical rules; revisiting that
|
|
50
52
|
is a deliberate change, not a side effect of introducing the token.
|
|
@@ -52,7 +54,8 @@
|
|
|
52
54
|
-strong frame borders and popover/menu/editor borders are still hardcoded 1px. */
|
|
53
55
|
--pretable-rule-vertical: var(--pretable-rule);
|
|
54
56
|
--pretable-rule-width: 1px;
|
|
55
|
-
--pretable-radius: 12px; /* M3 medium shape scale (matches Card) */
|
|
57
|
+
--pretable-radius-frame: 12px; /* M3 medium shape scale (matches Card) */
|
|
58
|
+
--pretable-radius: 12px; /* Menus and popovers share the medium scale */
|
|
56
59
|
/* Small affordances need their own step: the card radius applied to a 14–18px
|
|
57
60
|
control (funnel, ⋮ button, chip remove) rounds it into a circle. M3 small
|
|
58
61
|
shape scale. */
|
|
@@ -113,8 +116,9 @@
|
|
|
113
116
|
scale is named for what is lifted, not for the drag ghost that happened to
|
|
114
117
|
need one first. */
|
|
115
118
|
--pretable-shadow-overlay: 0 4px 12px rgb(0 0 0 / 0.12);
|
|
116
|
-
/* No card shadow: this theme draws a frame instead.
|
|
119
|
+
/* No card shadow: this theme draws a frame instead. */
|
|
117
120
|
--pretable-shadow-card: none;
|
|
121
|
+
--pretable-shadow-header: none;
|
|
118
122
|
/* The frozen-column edge, as a COLOUR rather than a whole shadow: the right
|
|
119
123
|
edge needs the mirror of the left one's offset, and a single shadow value
|
|
120
124
|
cannot be flipped. grid.css owns the geometry — which is structural — and
|
package/themes/pretable.css
CHANGED
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
* dark — all three separate by TONE; shadows are invisible on dark ground,
|
|
31
31
|
* so tier 3 is the lightest surface in the theme.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* header
|
|
37
|
-
*
|
|
33
|
+
* There is no container edge. The grid is frameless: --pretable-frame is 0,
|
|
34
|
+
* --pretable-shadow-card is none, --pretable-radius-frame is 0. Embedded in a host
|
|
35
|
+
* page it is one plane with the page, separated from it by whitespace and by
|
|
36
|
+
* the header's tint alone. The sticky header's seam against rows scrolling
|
|
37
|
+
* under it is --pretable-shadow-header, drawn only while the surface reports
|
|
38
|
+
* [data-pretable-scrolled]; at rest the header ends in a decorative hairline.
|
|
38
39
|
*
|
|
39
40
|
* Default density: standard. Designed against a #ffffff to #f4f4f6 page.
|
|
40
41
|
*
|
|
@@ -46,17 +47,18 @@
|
|
|
46
47
|
color-scheme: light;
|
|
47
48
|
|
|
48
49
|
/* --- Tier 1: chrome / the inset canvas ------------------------------- */
|
|
49
|
-
/* The header is TINTED on purpose. A white header would
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
--pretable-bg-
|
|
50
|
+
/* The header is TINTED on purpose, but only just. A white header would give
|
|
51
|
+
every hairline drawn on it nothing to read against; 1.07:1 off the data
|
|
52
|
+
surface is a whisper — enough to register as a plane, not as a fill. The
|
|
53
|
+
rail no longer needs the tint to separate it from rows scrolling under
|
|
54
|
+
it: that is --pretable-shadow-header's job, in Elevation below. */
|
|
55
|
+
--pretable-bg-header: #f7f7f9;
|
|
56
|
+
--pretable-bg-toolbar: #f7f7f9;
|
|
55
57
|
|
|
56
58
|
/* --- Tier 1.5: structure inside the data plane ----------------------- */
|
|
57
59
|
/* Group rows no longer borrow the header token. They sit between the canvas
|
|
58
60
|
and the paper: heavier than a record, lighter than the rail. */
|
|
59
|
-
--pretable-bg-group-row: #
|
|
61
|
+
--pretable-bg-group-row: #fafafb;
|
|
60
62
|
|
|
61
63
|
/* --- Tier 2: paper / the records ------------------------------------- */
|
|
62
64
|
--pretable-bg-grid: #ffffff;
|
|
@@ -74,21 +76,29 @@
|
|
|
74
76
|
text-dim is deliberately NOT a clone of text-header — the two shipped
|
|
75
77
|
themes set them to the same literal, which makes the header and the
|
|
76
78
|
secondary content impossible to tune apart. Here the header is the
|
|
77
|
-
quietest text in the grid (
|
|
78
|
-
chrome; text-dim is secondary CONTENT (
|
|
79
|
-
|
|
79
|
+
quietest text in the grid (4.92:1 on the header it sits on, 5.26:1 on
|
|
80
|
+
the grid) because it is chrome; text-dim is secondary CONTENT (7.22:1 on
|
|
81
|
+
the header, 7.72:1 on the grid) and includes a 9px sort-priority badge, so
|
|
82
|
+
it gets more contrast, not less. Both clear AA on every surface they
|
|
83
|
+
touch. */
|
|
80
84
|
--pretable-text-cell: #1a1a1f;
|
|
81
|
-
--pretable-text-header: #
|
|
85
|
+
--pretable-text-header: #6b6b76;
|
|
82
86
|
--pretable-text-dim: #52525c;
|
|
83
87
|
|
|
84
88
|
/* --- Lines ----------------------------------------------------------- */
|
|
85
|
-
/* The row hairline. Decorative,
|
|
86
|
-
--pretable-rule: #
|
|
87
|
-
/*
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
--pretable-rule-
|
|
89
|
+
/* The row hairline. Decorative, faint on purpose (1.18:1 on the grid). */
|
|
90
|
+
--pretable-rule: #ececf0;
|
|
91
|
+
/* The header's resting underline: one step darker than the row hairline so
|
|
92
|
+
the rail ends somewhere (1.16:1 on the header), still decorative. The
|
|
93
|
+
load-bearing seam is the scrolled shadow in Elevation below, not this
|
|
94
|
+
line. */
|
|
95
|
+
--pretable-rule-header: #e6e6eb;
|
|
96
|
+
/* One job now: the edge of the kit listbox, the date popover and the badge.
|
|
97
|
+
It no longer frames the container or underlines the header, so it no
|
|
98
|
+
longer owes 3:1 against either. 1.77:1 on the white surfaces it edges. */
|
|
99
|
+
--pretable-rule-strong: #c2c2cb;
|
|
100
|
+
/* No frame. The compatibility skins set this to a 1px line. */
|
|
101
|
+
--pretable-frame: 0;
|
|
92
102
|
/* No cage. This is the single biggest visual difference from a spreadsheet,
|
|
93
103
|
and it matters more as rows get taller: in a wrapped 90px row a vertical
|
|
94
104
|
divider becomes a long empty channel running through whitespace. */
|
|
@@ -96,6 +106,10 @@
|
|
|
96
106
|
--pretable-rule-width: 1px;
|
|
97
107
|
|
|
98
108
|
/* --- Radii ----------------------------------------------------------- */
|
|
109
|
+
/* The container is square because it has no frame: with no edge and no
|
|
110
|
+
shadow there is no corner for a radius to round. Menus, popovers and the
|
|
111
|
+
group chips are lifted, edged surfaces and keep the 10px radius. */
|
|
112
|
+
--pretable-radius-frame: 0;
|
|
99
113
|
--pretable-radius: 10px;
|
|
100
114
|
--pretable-radius-control: 6px;
|
|
101
115
|
|
|
@@ -115,7 +129,7 @@
|
|
|
115
129
|
else. The other two values live elsewhere in this block, because they do
|
|
116
130
|
different jobs and cannot be one literal:
|
|
117
131
|
#2554cf the loud one — focus ring, checked checkbox, resize
|
|
118
|
-
handle on hover, drop indicator, and at
|
|
132
|
+
handle on hover, drop indicator, and at 7% the range
|
|
119
133
|
tint in --pretable-selection-bg.
|
|
120
134
|
--pretable-bg-selected (#dfe6fb) + --pretable-text-selected (#131826)
|
|
121
135
|
a pale blue SURFACE and its ink, behind a selected
|
|
@@ -132,8 +146,8 @@
|
|
|
132
146
|
"and nothing else" above is guarding: the checked checkbox is painted by
|
|
133
147
|
--pretable-checkbox-checked-bg (#2554cf), and the white mark on it is
|
|
134
148
|
6.47:1 there without this token taking part. 7.11:1 as text on the
|
|
135
|
-
#ffffff popover the Clear button and the calendar sit on; 6.
|
|
136
|
-
funnel icon on the #
|
|
149
|
+
#ffffff popover the Clear button and the calendar sit on; 6.64:1 as the
|
|
150
|
+
funnel icon on the #f7f7f9 header rail, where the floor is the 3:1
|
|
137
151
|
non-text one. */
|
|
138
152
|
--pretable-accent: #3f5a7a;
|
|
139
153
|
|
|
@@ -168,9 +182,12 @@
|
|
|
168
182
|
/* Written as literals rather than var() aliases so the dark block can move
|
|
169
183
|
them independently — aliasing checkbox-border to rule-strong is what lets
|
|
170
184
|
an affordance inherit a decorative value. */
|
|
171
|
-
--pretable-selection-bg: rgba(37, 84, 207, 0.
|
|
185
|
+
--pretable-selection-bg: rgba(37, 84, 207, 0.07);
|
|
172
186
|
--pretable-checkbox-bg: #ffffff;
|
|
173
|
-
|
|
187
|
+
/* An affordance, so it owes the 3:1 non-text floor on BOTH surfaces it sits
|
|
188
|
+
on: 3.24:1 on the paper, 3.03:1 on the header rail under the select-all
|
|
189
|
+
box. */
|
|
190
|
+
--pretable-checkbox-border: #8e8e99;
|
|
174
191
|
--pretable-checkbox-checked-bg: #2554cf;
|
|
175
192
|
--pretable-checkbox-checked-fg: #ffffff;
|
|
176
193
|
--pretable-resize-handle: transparent;
|
|
@@ -184,11 +201,13 @@
|
|
|
184
201
|
tell of a theme that was eyeballed. */
|
|
185
202
|
--pretable-shadow-overlay:
|
|
186
203
|
0 1px 2px rgba(16, 17, 26, 0.06), 0 8px 24px -6px rgba(16, 17, 26, 0.16);
|
|
187
|
-
/* The container
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
204
|
+
/* The container casts nothing. It is not a card. */
|
|
205
|
+
--pretable-shadow-card: none;
|
|
206
|
+
/* The sticky header's seam, present only while rows are underneath it. A
|
|
207
|
+
contact layer plus a short ambient; the ambient's negative spread keeps
|
|
208
|
+
it under the first row instead of washing three rows. */
|
|
209
|
+
--pretable-shadow-header:
|
|
210
|
+
0 1px 2px rgba(16, 17, 26, 0.06), 0 6px 12px -8px rgba(16, 17, 26, 0.18);
|
|
192
211
|
/* The frozen-column edge, now that pinned cells no longer announce
|
|
193
212
|
themselves with a grey fill. Spread must be <= -blur/2 or the blur bleeds
|
|
194
213
|
above and below each pinned cell and bands every row boundary. */
|
|
@@ -263,11 +282,11 @@
|
|
|
263
282
|
color-scheme: dark;
|
|
264
283
|
|
|
265
284
|
/* Tier 1 — chrome / the inset canvas */
|
|
266
|
-
--pretable-bg-header: #
|
|
267
|
-
--pretable-bg-toolbar: #
|
|
285
|
+
--pretable-bg-header: #1a1a20;
|
|
286
|
+
--pretable-bg-toolbar: #1a1a20;
|
|
268
287
|
|
|
269
288
|
/* Tier 1.5 — structure */
|
|
270
|
-
--pretable-bg-group-row: #
|
|
289
|
+
--pretable-bg-group-row: #17171c;
|
|
271
290
|
|
|
272
291
|
/* Tier 2 — paper / the records */
|
|
273
292
|
--pretable-bg-grid: #141418;
|
|
@@ -281,12 +300,14 @@
|
|
|
281
300
|
|
|
282
301
|
/* Text */
|
|
283
302
|
--pretable-text-cell: #ededf2;
|
|
284
|
-
--pretable-text-header: #
|
|
303
|
+
--pretable-text-header: #8f8f9c; /* 5.42:1 on the header, 5.75:1 on the grid */
|
|
285
304
|
--pretable-text-dim: #adadbb;
|
|
286
305
|
|
|
287
306
|
/* Lines */
|
|
288
|
-
--pretable-rule: #
|
|
289
|
-
--pretable-rule-
|
|
307
|
+
--pretable-rule: #25252c; /* 1.21:1 on the grid */
|
|
308
|
+
--pretable-rule-header: #2a2a32; /* 1.22:1 on the header */
|
|
309
|
+
--pretable-rule-strong: #3a3a44; /* 1.63:1 on the grid, 1.40:1 on the lifted tier */
|
|
310
|
+
--pretable-frame: 0;
|
|
290
311
|
--pretable-rule-vertical: transparent;
|
|
291
312
|
|
|
292
313
|
/* State */
|
|
@@ -312,9 +333,9 @@
|
|
|
312
333
|
--pretable-info: #93b4ff;
|
|
313
334
|
|
|
314
335
|
/* Grid controls */
|
|
315
|
-
--pretable-selection-bg: rgba(138, 176, 255, 0.
|
|
336
|
+
--pretable-selection-bg: rgba(138, 176, 255, 0.12);
|
|
316
337
|
--pretable-checkbox-bg: #141418;
|
|
317
|
-
--pretable-checkbox-border: #
|
|
338
|
+
--pretable-checkbox-border: #6a6a78; /* 3.45:1 on the paper, 3.25:1 on the rail */
|
|
318
339
|
--pretable-checkbox-checked-bg: #8ab0ff;
|
|
319
340
|
/* Dark ink, not white. White on a light-blue chip is 1.70:1 — the defect
|
|
320
341
|
Material ships because it left this token out of its dark block. */
|
|
@@ -328,7 +349,8 @@
|
|
|
328
349
|
glow; the separation comes from the tonal step above, not from the shadow. */
|
|
329
350
|
--pretable-shadow-overlay:
|
|
330
351
|
0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px -8px rgba(0, 0, 0, 0.7);
|
|
331
|
-
--pretable-shadow-card:
|
|
332
|
-
|
|
352
|
+
--pretable-shadow-card: none;
|
|
353
|
+
--pretable-shadow-header:
|
|
354
|
+
0 1px 0 rgba(0, 0, 0, 0.6), 0 6px 12px -8px rgba(0, 0, 0, 0.7);
|
|
333
355
|
--pretable-seam-color: rgba(0, 0, 0, 0.62);
|
|
334
356
|
}
|