@gridkitjs/theme-css 0.2.0 → 0.3.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/package.json +1 -1
- package/src/styles.css +450 -70
package/package.json
CHANGED
package/src/styles.css
CHANGED
|
@@ -275,10 +275,10 @@
|
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
/*
|
|
278
|
-
* The
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
278
|
+
* The grid's root. The tables scroll inside it, in
|
|
279
|
+
* `.gridkit-data-grid-tables`, so the toolbar, the group-by bar and the
|
|
280
|
+
* pager stay where they are; it scrolls sideways itself only when one of
|
|
281
|
+
* those is wider than it.
|
|
282
282
|
*/
|
|
283
283
|
.gridkit-data-grid-viewport {
|
|
284
284
|
overflow-x: auto;
|
|
@@ -301,35 +301,81 @@
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
/*
|
|
304
|
-
* The
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
304
|
+
* The one scroll area for the header, the rows and the footer, on both
|
|
305
|
+
* axes. The tables are exactly as wide as their columns, so columns wider
|
|
306
|
+
* than the space available scroll here rather than squash. The header and
|
|
307
|
+
* footer stick to its top and bottom and stay in view while the rows
|
|
308
|
+
* scroll under them; with one element scrolling sideways they cannot fall
|
|
309
|
+
* out of line with the rows, and a cell made to stick sideways sticks in
|
|
310
|
+
* all three tables alike.
|
|
309
311
|
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
|
|
312
|
+
* `height` bounds the rows alone: the grid sets `--gridkit-body-height`
|
|
313
|
+
* here from it, and `--gridkit-header-height` and
|
|
314
|
+
* `--gridkit-footer-height` from the two tables' measured heights, and
|
|
315
|
+
* the area grows by both. Without `height` the area is as tall as its
|
|
316
|
+
* content and scrolls only sideways, and the header, with nothing
|
|
317
|
+
* scrolling under it, never sticks.
|
|
318
|
+
*/
|
|
319
|
+
.gridkit-data-grid-tables {
|
|
320
|
+
overflow: auto;
|
|
321
|
+
height: calc(
|
|
322
|
+
var(--gridkit-body-height) + var(--gridkit-header-height, 0px) +
|
|
323
|
+
var(--gridkit-footer-height, 0px)
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/*
|
|
328
|
+
* Above the rows scrolled under them. A consumer wanting a divider or
|
|
329
|
+
* shadow at the seam adds their own CSS targeting
|
|
330
|
+
* `.gridkit-data-grid-header`/`.gridkit-data-grid-footer`.
|
|
331
|
+
*/
|
|
332
|
+
.gridkit-data-grid-header {
|
|
333
|
+
position: sticky;
|
|
334
|
+
inset-block-start: 0;
|
|
335
|
+
z-index: 2;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.gridkit-data-grid-footer {
|
|
339
|
+
position: sticky;
|
|
340
|
+
inset-block-end: 0;
|
|
341
|
+
z-index: 2;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/*
|
|
345
|
+
* The rows' rowgroup. As wide as its table, and never narrower than the
|
|
346
|
+
* scroll area, so its box covers every row however far the area scrolls
|
|
347
|
+
* sideways; and at least `height` tall, so under a few rows the space
|
|
348
|
+
* down to the footer is the body's.
|
|
317
349
|
*/
|
|
318
350
|
.gridkit-data-grid-body {
|
|
319
|
-
|
|
320
|
-
|
|
351
|
+
width: max-content;
|
|
352
|
+
min-width: 100%;
|
|
353
|
+
min-height: var(--gridkit-body-height, 0);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/*
|
|
357
|
+
* Keeps a row or cell that keyboard focus or `scrollToRow` scrolls into
|
|
358
|
+
* view clear of the header and footer stuck over the rows. A margin on the
|
|
359
|
+
* rows rather than padding on the scroll area: a header cell, stuck at the
|
|
360
|
+
* area's top, would sit inside that padding, and focusing it would scroll
|
|
361
|
+
* the rows to make room.
|
|
362
|
+
*/
|
|
363
|
+
.gridkit-data-grid-body tr,
|
|
364
|
+
.gridkit-data-grid-body td {
|
|
365
|
+
scroll-margin-block: var(--gridkit-header-height, 0px)
|
|
366
|
+
var(--gridkit-footer-height, 0px);
|
|
321
367
|
}
|
|
322
368
|
|
|
323
369
|
/*
|
|
324
370
|
* Slim scrollbars on the grid's own scroll regions, never on the page: the
|
|
325
|
-
* viewport, the
|
|
326
|
-
* checklist lists. Chromium and Firefox honour
|
|
371
|
+
* viewport, the tables' scroll area, the menus, and the column chooser and
|
|
372
|
+
* filter checklist lists. Chromium and Firefox honour
|
|
327
373
|
* `scrollbar-width`/`scrollbar-color`; the `::-webkit-scrollbar` rules are
|
|
328
374
|
* only for engines that do not, since a browser that supports the standard
|
|
329
375
|
* properties ignores them anyway.
|
|
330
376
|
*/
|
|
331
377
|
.gridkit-data-grid-viewport,
|
|
332
|
-
.gridkit-data-grid-
|
|
378
|
+
.gridkit-data-grid-tables,
|
|
333
379
|
.gridkit-menu,
|
|
334
380
|
.gridkit-column-chooser-list,
|
|
335
381
|
.gridkit-filter-menu-checklist {
|
|
@@ -339,7 +385,7 @@
|
|
|
339
385
|
|
|
340
386
|
@supports not (scrollbar-color: auto) {
|
|
341
387
|
.gridkit-data-grid-viewport::-webkit-scrollbar,
|
|
342
|
-
.gridkit-data-grid-
|
|
388
|
+
.gridkit-data-grid-tables::-webkit-scrollbar,
|
|
343
389
|
.gridkit-menu::-webkit-scrollbar,
|
|
344
390
|
.gridkit-column-chooser-list::-webkit-scrollbar,
|
|
345
391
|
.gridkit-filter-menu-checklist::-webkit-scrollbar {
|
|
@@ -348,7 +394,7 @@
|
|
|
348
394
|
}
|
|
349
395
|
|
|
350
396
|
.gridkit-data-grid-viewport::-webkit-scrollbar-track,
|
|
351
|
-
.gridkit-data-grid-
|
|
397
|
+
.gridkit-data-grid-tables::-webkit-scrollbar-track,
|
|
352
398
|
.gridkit-menu::-webkit-scrollbar-track,
|
|
353
399
|
.gridkit-column-chooser-list::-webkit-scrollbar-track,
|
|
354
400
|
.gridkit-filter-menu-checklist::-webkit-scrollbar-track {
|
|
@@ -356,7 +402,7 @@
|
|
|
356
402
|
}
|
|
357
403
|
|
|
358
404
|
.gridkit-data-grid-viewport::-webkit-scrollbar-thumb,
|
|
359
|
-
.gridkit-data-grid-
|
|
405
|
+
.gridkit-data-grid-tables::-webkit-scrollbar-thumb,
|
|
360
406
|
.gridkit-menu::-webkit-scrollbar-thumb,
|
|
361
407
|
.gridkit-column-chooser-list::-webkit-scrollbar-thumb,
|
|
362
408
|
.gridkit-filter-menu-checklist::-webkit-scrollbar-thumb {
|
|
@@ -389,9 +435,15 @@
|
|
|
389
435
|
* `fixed` is what makes a width a width. Under the default `auto` layout the
|
|
390
436
|
* browser treats the colgroup as a hint and re-apportions space by content,
|
|
391
437
|
* so dragging one column visibly shifts its neighbours.
|
|
438
|
+
*
|
|
439
|
+
* Separate borders, so each cell owns its lines: a cell made to stick
|
|
440
|
+
* sideways carries them along, where a collapsed table would paint them at
|
|
441
|
+
* the cell's unstuck place. Each seam is drawn by one of its two cells
|
|
442
|
+
* only, as the borders section below explains.
|
|
392
443
|
*/
|
|
393
444
|
.gridkit-data-grid {
|
|
394
|
-
border-collapse:
|
|
445
|
+
border-collapse: separate;
|
|
446
|
+
border-spacing: 0;
|
|
395
447
|
table-layout: fixed;
|
|
396
448
|
}
|
|
397
449
|
|
|
@@ -444,7 +496,7 @@
|
|
|
444
496
|
.gridkit-data-grid .gridkit-header-resize-handle {
|
|
445
497
|
position: absolute;
|
|
446
498
|
top: 0;
|
|
447
|
-
|
|
499
|
+
inset-inline-end: 0;
|
|
448
500
|
bottom: 0;
|
|
449
501
|
width: 6px;
|
|
450
502
|
cursor: col-resize;
|
|
@@ -456,7 +508,7 @@
|
|
|
456
508
|
/*
|
|
457
509
|
* A resize colours the edge being dragged on every cell in the column, so it
|
|
458
510
|
* reads as one line down the grid rather than a stack of outlined cells.
|
|
459
|
-
* `box-shadow` rather than
|
|
511
|
+
* `box-shadow` rather than a border: under `borders="none"` there is no
|
|
460
512
|
* border to recolour, and adding one would shift the cell's content by a
|
|
461
513
|
* pixel mid-drag.
|
|
462
514
|
*/
|
|
@@ -466,13 +518,20 @@
|
|
|
466
518
|
var(--gridkit-hover-line);
|
|
467
519
|
}
|
|
468
520
|
|
|
521
|
+
/* A shadow's offset is physical, so right-to-left moves it to the left edge. */
|
|
522
|
+
.gridkit-data-grid .gridkit-header-cell.is-resizing:dir(rtl),
|
|
523
|
+
.gridkit-data-grid .gridkit-grid-cell.is-resizing:dir(rtl) {
|
|
524
|
+
box-shadow: inset var(--gridkit-indicator-width) 0 0 0
|
|
525
|
+
var(--gridkit-hover-line);
|
|
526
|
+
}
|
|
527
|
+
|
|
469
528
|
/*
|
|
470
529
|
* The grid is one tab stop and the arrow keys move within it, so the focused
|
|
471
530
|
* cell is the only sign of where that stop currently is — without this ring a
|
|
472
531
|
* keyboard user is navigating blind.
|
|
473
532
|
*
|
|
474
|
-
* Inset because the
|
|
475
|
-
* would be cut off on the first and last columns.
|
|
533
|
+
* Inset because the scroll area clips its overflow: an outline drawn
|
|
534
|
+
* outwards would be cut off on the first and last columns.
|
|
476
535
|
*/
|
|
477
536
|
.gridkit-data-grid .gridkit-header-cell:focus-visible,
|
|
478
537
|
.gridkit-data-grid .gridkit-grid-cell:focus-visible {
|
|
@@ -497,6 +556,17 @@
|
|
|
497
556
|
opacity: 0.5;
|
|
498
557
|
}
|
|
499
558
|
|
|
559
|
+
/*
|
|
560
|
+
* The headers of the other pin groups while a header is dragged: a column
|
|
561
|
+
* stays in its own group, so they take no drop. Muted rather than faded,
|
|
562
|
+
* since a pinned header's background must stay opaque over the cells
|
|
563
|
+
* scrolled under it.
|
|
564
|
+
*/
|
|
565
|
+
.gridkit-data-grid .gridkit-header-cell.is-drag-blocked {
|
|
566
|
+
cursor: not-allowed;
|
|
567
|
+
color: var(--gridkit-fg-muted);
|
|
568
|
+
}
|
|
569
|
+
|
|
500
570
|
/*
|
|
501
571
|
* A header, cell or group row that opens the grid's context menu — its
|
|
502
572
|
* `aria-keyshortcuts` names Shift+F10 then — takes a long-press for that
|
|
@@ -525,6 +595,7 @@
|
|
|
525
595
|
.gridkit-data-grid.gridkit-drag-ghost {
|
|
526
596
|
position: fixed;
|
|
527
597
|
top: 0;
|
|
598
|
+
/* Physical in either direction: the transform is a viewport x from the left. */
|
|
528
599
|
left: 0;
|
|
529
600
|
z-index: 50;
|
|
530
601
|
padding: var(--gridkit-header-padding-y) var(--gridkit-header-padding-x);
|
|
@@ -567,14 +638,24 @@
|
|
|
567
638
|
var(--gridkit-accent);
|
|
568
639
|
}
|
|
569
640
|
|
|
641
|
+
/* Mirrored for the resize line's reason: a shadow's offset is physical. */
|
|
642
|
+
.gridkit-data-grid .gridkit-header-cell.is-drop-before:dir(rtl) {
|
|
643
|
+
box-shadow: inset calc(var(--gridkit-indicator-width) * -1) 0 0 0
|
|
644
|
+
var(--gridkit-accent);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.gridkit-data-grid .gridkit-header-cell.is-drop-after:dir(rtl) {
|
|
648
|
+
box-shadow: inset var(--gridkit-indicator-width) 0 0 0 var(--gridkit-accent);
|
|
649
|
+
}
|
|
650
|
+
|
|
570
651
|
/*
|
|
571
|
-
* Docked to the header's own
|
|
652
|
+
* Docked to the header's own inline-end edge, absolutely — like the resize
|
|
572
653
|
* handle, and for the same reason: sitting in the label's normal flow, a
|
|
573
654
|
* long label under `text-overflow: ellipsis` pushes the toggle out past
|
|
574
655
|
* where `overflow: hidden` clips it, leaving it unclickable (a real click
|
|
575
656
|
* there lands on the header cell instead and selects the column). Docked
|
|
576
657
|
* to a fixed offset, it stays inside the clipped area — and clear of the
|
|
577
|
-
* resize handle's own 6px strip at
|
|
658
|
+
* resize handle's own 6px strip at the inline end, so a resizable, sortable
|
|
578
659
|
* column keeps two independent hit targets rather than one shadowing the
|
|
579
660
|
* other.
|
|
580
661
|
*/
|
|
@@ -582,7 +663,7 @@
|
|
|
582
663
|
display: inline-flex;
|
|
583
664
|
position: absolute;
|
|
584
665
|
top: 50%;
|
|
585
|
-
|
|
666
|
+
inset-inline-end: calc(var(--gridkit-spacing) * 3);
|
|
586
667
|
transform: translateY(-50%);
|
|
587
668
|
align-items: center;
|
|
588
669
|
gap: calc(var(--gridkit-spacing) * 0.5);
|
|
@@ -647,7 +728,7 @@
|
|
|
647
728
|
display: inline-flex;
|
|
648
729
|
align-items: center;
|
|
649
730
|
vertical-align: middle;
|
|
650
|
-
margin-
|
|
731
|
+
margin-inline-end: calc(var(--gridkit-spacing) * 1.5);
|
|
651
732
|
cursor: pointer;
|
|
652
733
|
color: var(--gridkit-fg-muted);
|
|
653
734
|
}
|
|
@@ -689,7 +770,7 @@
|
|
|
689
770
|
display: inline-flex;
|
|
690
771
|
position: absolute;
|
|
691
772
|
top: 50%;
|
|
692
|
-
|
|
773
|
+
inset-inline-end: calc(var(--gridkit-spacing) * 3);
|
|
693
774
|
transform: translateY(-50%);
|
|
694
775
|
align-items: center;
|
|
695
776
|
cursor: pointer;
|
|
@@ -728,7 +809,96 @@
|
|
|
728
809
|
.gridkit-header-cell:has(> .gridkit-header-filter-toggle)
|
|
729
810
|
.gridkit-header-sort-toggle {
|
|
730
811
|
/* The filter button's offset and width, then a gap. */
|
|
731
|
-
|
|
812
|
+
inset-inline-end: calc(
|
|
813
|
+
var(--gridkit-spacing) * 4.5 + var(--gridkit-header-icon-size)
|
|
814
|
+
);
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/*
|
|
818
|
+
* A screen that cannot hover never brings the header's toggles out, so
|
|
819
|
+
* there they show at rest, still told apart by colour and fill once the
|
|
820
|
+
* column is sorted, filtered or grouped.
|
|
821
|
+
*/
|
|
822
|
+
@media (hover: none) {
|
|
823
|
+
.gridkit-data-grid
|
|
824
|
+
.gridkit-header-sort-toggle:not(.is-sorted-asc):not(.is-sorted-desc),
|
|
825
|
+
.gridkit-data-grid .gridkit-header-filter-toggle:not(.is-filtered),
|
|
826
|
+
.gridkit-data-grid .gridkit-header-group-toggle:not(.is-grouped) {
|
|
827
|
+
opacity: 1;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/*
|
|
832
|
+
* A finger needs 24 by 24 pixels to land on, WCAG 2.2's minimum target.
|
|
833
|
+
* Each toggle grows its box by padding around an unchanged icon, and the
|
|
834
|
+
* ones docked to the inline end move inward to sit side by side, clear of
|
|
835
|
+
* the resize handle, which widens to the same 24 pixels. The handle draws
|
|
836
|
+
* nothing of its own, so the line a resize colours stays on the column's
|
|
837
|
+
* edge.
|
|
838
|
+
*/
|
|
839
|
+
@media (pointer: coarse) {
|
|
840
|
+
.gridkit-data-grid .gridkit-header-resize-handle {
|
|
841
|
+
width: 24px;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.gridkit-data-grid .gridkit-header-sort-toggle,
|
|
845
|
+
.gridkit-data-grid .gridkit-header-filter-toggle,
|
|
846
|
+
.gridkit-data-grid .gridkit-header-group-toggle {
|
|
847
|
+
box-sizing: border-box;
|
|
848
|
+
min-width: 24px;
|
|
849
|
+
min-height: 24px;
|
|
850
|
+
justify-content: center;
|
|
851
|
+
padding: max(0px, calc((24px - var(--gridkit-header-icon-size)) / 2));
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.gridkit-data-grid .gridkit-header-sort-toggle,
|
|
855
|
+
.gridkit-data-grid .gridkit-header-filter-toggle {
|
|
856
|
+
inset-inline-end: 24px;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.gridkit-data-grid
|
|
860
|
+
.gridkit-header-cell:has(> .gridkit-header-filter-toggle)
|
|
861
|
+
.gridkit-header-sort-toggle {
|
|
862
|
+
inset-inline-end: 48px;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
/*
|
|
866
|
+
* A touch screen shows the docked toggles at rest, where they would sit
|
|
867
|
+
* over the label, so the label keeps clear of them and is cut short
|
|
868
|
+
* instead.
|
|
869
|
+
*/
|
|
870
|
+
.gridkit-data-grid
|
|
871
|
+
.gridkit-grid-header
|
|
872
|
+
.gridkit-header-cell:has(> .gridkit-header-sort-toggle),
|
|
873
|
+
.gridkit-data-grid
|
|
874
|
+
.gridkit-grid-header
|
|
875
|
+
.gridkit-header-cell:has(> .gridkit-header-filter-toggle) {
|
|
876
|
+
padding-inline-end: 48px;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.gridkit-data-grid
|
|
880
|
+
.gridkit-grid-header
|
|
881
|
+
.gridkit-header-cell:has(> .gridkit-header-sort-toggle):has(
|
|
882
|
+
> .gridkit-header-filter-toggle
|
|
883
|
+
) {
|
|
884
|
+
padding-inline-end: 72px;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/* Grown into the header's padding, so the label stays where it was. */
|
|
888
|
+
.gridkit-data-grid .gridkit-header-group-toggle {
|
|
889
|
+
margin-block: min(
|
|
890
|
+
0px,
|
|
891
|
+
calc((var(--gridkit-header-icon-size) - 24px) / 2)
|
|
892
|
+
);
|
|
893
|
+
margin-inline-start: min(
|
|
894
|
+
0px,
|
|
895
|
+
calc((var(--gridkit-header-icon-size) - 24px) / 2)
|
|
896
|
+
);
|
|
897
|
+
margin-inline-end: calc(
|
|
898
|
+
var(--gridkit-spacing) * 1.5 +
|
|
899
|
+
min(0px, calc((var(--gridkit-header-icon-size) - 24px) / 2))
|
|
900
|
+
);
|
|
901
|
+
}
|
|
732
902
|
}
|
|
733
903
|
|
|
734
904
|
.gridkit-data-grid .gridkit-grid-cell {
|
|
@@ -789,7 +959,16 @@
|
|
|
789
959
|
outline-offset: calc(var(--gridkit-focus-ring-width) * -1);
|
|
790
960
|
}
|
|
791
961
|
|
|
962
|
+
/*
|
|
963
|
+
* Sticks to the scroll area's start edge, so a group's label stays in view
|
|
964
|
+
* however far a wide grid scrolls sideways; as wide as its content, so it
|
|
965
|
+
* has room to move along its row. It sticks only while the group cell does
|
|
966
|
+
* not clip: `overflow: clip`, unlike `hidden`, would keep it working.
|
|
967
|
+
*/
|
|
792
968
|
.gridkit-data-grid .gridkit-grid-group-cell-content {
|
|
969
|
+
position: sticky;
|
|
970
|
+
inset-inline-start: 0;
|
|
971
|
+
width: max-content;
|
|
793
972
|
display: flex;
|
|
794
973
|
align-items: center;
|
|
795
974
|
gap: calc(var(--gridkit-spacing) * 2);
|
|
@@ -797,16 +976,17 @@
|
|
|
797
976
|
font-weight: var(--gridkit-group-font-weight);
|
|
798
977
|
}
|
|
799
978
|
|
|
800
|
-
/* A
|
|
979
|
+
/* A triangle pointing to the inline end that rotates open on expand. */
|
|
801
980
|
.gridkit-data-grid .gridkit-grid-group-row .gridkit-group-toggle {
|
|
802
981
|
display: inline-block;
|
|
803
982
|
flex-shrink: 0;
|
|
804
983
|
width: 0;
|
|
805
984
|
height: 0;
|
|
806
985
|
border-style: solid;
|
|
807
|
-
border-width: calc(var(--gridkit-icon-size) / 4)
|
|
808
|
-
|
|
809
|
-
border-color: transparent
|
|
986
|
+
border-block-width: calc(var(--gridkit-icon-size) / 4);
|
|
987
|
+
border-inline-width: calc(var(--gridkit-icon-size) * 0.4) 0;
|
|
988
|
+
border-color: transparent;
|
|
989
|
+
border-inline-start-color: var(--gridkit-fg-muted);
|
|
810
990
|
transition: transform var(--gridkit-transition-duration) ease;
|
|
811
991
|
}
|
|
812
992
|
|
|
@@ -814,6 +994,13 @@
|
|
|
814
994
|
transform: rotate(90deg);
|
|
815
995
|
}
|
|
816
996
|
|
|
997
|
+
/* Pointing left, the triangle turns the other way to point down. */
|
|
998
|
+
.gridkit-data-grid
|
|
999
|
+
.gridkit-grid-group-row
|
|
1000
|
+
.gridkit-group-toggle.is-expanded:dir(rtl) {
|
|
1001
|
+
transform: rotate(-90deg);
|
|
1002
|
+
}
|
|
1003
|
+
|
|
817
1004
|
/*
|
|
818
1005
|
* Set on the rule rather than on `--gridkit-transition-duration`, so a
|
|
819
1006
|
* theme's own duration can't bring the motion back.
|
|
@@ -955,13 +1142,12 @@
|
|
|
955
1142
|
/*
|
|
956
1143
|
* Horizontal borders.
|
|
957
1144
|
*
|
|
958
|
-
*
|
|
959
|
-
*
|
|
960
|
-
*
|
|
961
|
-
*
|
|
962
|
-
*
|
|
963
|
-
*
|
|
964
|
-
* instead of collapsing into one:
|
|
1145
|
+
* Each cell owns its borders, so every seam is drawn by one of its two
|
|
1146
|
+
* cells only, never both, or the two lines would sit side by side as a
|
|
1147
|
+
* doubled one: a seam between rows is the upper cell's `border-bottom`,
|
|
1148
|
+
* and one between columns (in the vertical variants below) the earlier
|
|
1149
|
+
* cell's `border-inline-end`. The seams between the header, body and
|
|
1150
|
+
* footer tables follow the same rule:
|
|
965
1151
|
* - header/body seam: the header's own `border-bottom` here. The body's
|
|
966
1152
|
* first row never sets a `border-top` of its own.
|
|
967
1153
|
* - body/footer seam: the footer's own `border-top` (below, alongside
|
|
@@ -992,9 +1178,10 @@
|
|
|
992
1178
|
}
|
|
993
1179
|
|
|
994
1180
|
/*
|
|
995
|
-
* The last row's bottom edge
|
|
996
|
-
*
|
|
997
|
-
*
|
|
1181
|
+
* The last row's bottom edge is no seam between two rows, so it draws no
|
|
1182
|
+
* line: the footer draws its own, and without a footer the line would be
|
|
1183
|
+
* one more than the rows have seams — the same reason
|
|
1184
|
+
* `gridkit-borders-vertical` drops its `:last-child` end border below.
|
|
998
1185
|
* Matched against both row kinds: the last rendered row can just as well
|
|
999
1186
|
* be a collapsed group header as a data row.
|
|
1000
1187
|
*/
|
|
@@ -1017,8 +1204,8 @@
|
|
|
1017
1204
|
.gridkit-data-grid.gridkit-borders-vertical .gridkit-grid-cell,
|
|
1018
1205
|
.gridkit-data-grid.gridkit-borders-vertical .gridkit-grid-footer-cell,
|
|
1019
1206
|
.gridkit-data-grid.gridkit-borders-vertical .gridkit-grid-group-summary-cell {
|
|
1020
|
-
border-
|
|
1021
|
-
var(--gridkit-line);
|
|
1207
|
+
border-inline-end: var(--gridkit-column-line-width)
|
|
1208
|
+
var(--gridkit-border-style) var(--gridkit-line);
|
|
1022
1209
|
}
|
|
1023
1210
|
|
|
1024
1211
|
.gridkit-data-grid.gridkit-borders-vertical
|
|
@@ -1029,7 +1216,7 @@
|
|
|
1029
1216
|
.gridkit-grid-footer-cell:last-child,
|
|
1030
1217
|
.gridkit-data-grid.gridkit-borders-vertical
|
|
1031
1218
|
.gridkit-grid-group-summary-cell:last-child {
|
|
1032
|
-
border-
|
|
1219
|
+
border-inline-end: none;
|
|
1033
1220
|
}
|
|
1034
1221
|
|
|
1035
1222
|
/* Borders on all sides */
|
|
@@ -1041,21 +1228,21 @@
|
|
|
1041
1228
|
.gridkit-data-grid.gridkit-borders-all .gridkit-grid-group-summary-cell {
|
|
1042
1229
|
border-bottom: var(--gridkit-row-line-width) var(--gridkit-border-style)
|
|
1043
1230
|
var(--gridkit-line);
|
|
1044
|
-
border-
|
|
1045
|
-
var(--gridkit-line);
|
|
1231
|
+
border-inline-end: var(--gridkit-column-line-width)
|
|
1232
|
+
var(--gridkit-border-style) var(--gridkit-line);
|
|
1046
1233
|
}
|
|
1047
1234
|
|
|
1048
1235
|
.gridkit-data-grid.gridkit-borders-all .gridkit-grid-footer-cell {
|
|
1049
|
-
border-
|
|
1050
|
-
var(--gridkit-line);
|
|
1236
|
+
border-inline-end: var(--gridkit-column-line-width)
|
|
1237
|
+
var(--gridkit-border-style) var(--gridkit-line);
|
|
1051
1238
|
}
|
|
1052
1239
|
|
|
1053
1240
|
/*
|
|
1054
|
-
* The outer
|
|
1055
|
-
*
|
|
1056
|
-
*
|
|
1057
|
-
*
|
|
1058
|
-
*
|
|
1241
|
+
* The outer start and end edges are no seam between two columns, so they
|
|
1242
|
+
* draw no line: one there would sit against the scroll area's edge, or
|
|
1243
|
+
* double the grid's outer border when it has one. A group cell is both its
|
|
1244
|
+
* row's first and last child at once (it is the only cell), so it takes
|
|
1245
|
+
* both exceptions.
|
|
1059
1246
|
*/
|
|
1060
1247
|
.gridkit-data-grid.gridkit-borders-all
|
|
1061
1248
|
.gridkit-grid-header
|
|
@@ -1065,7 +1252,7 @@
|
|
|
1065
1252
|
.gridkit-data-grid.gridkit-borders-all .gridkit-grid-footer-cell:first-child,
|
|
1066
1253
|
.gridkit-data-grid.gridkit-borders-all
|
|
1067
1254
|
.gridkit-grid-group-summary-cell:first-child {
|
|
1068
|
-
border-
|
|
1255
|
+
border-inline-start: none;
|
|
1069
1256
|
}
|
|
1070
1257
|
|
|
1071
1258
|
.gridkit-data-grid.gridkit-borders-all
|
|
@@ -1076,7 +1263,7 @@
|
|
|
1076
1263
|
.gridkit-data-grid.gridkit-borders-all .gridkit-grid-footer-cell:last-child,
|
|
1077
1264
|
.gridkit-data-grid.gridkit-borders-all
|
|
1078
1265
|
.gridkit-grid-group-summary-cell:last-child {
|
|
1079
|
-
border-
|
|
1266
|
+
border-inline-end: none;
|
|
1080
1267
|
}
|
|
1081
1268
|
|
|
1082
1269
|
.gridkit-data-grid.gridkit-borders-all
|
|
@@ -1091,11 +1278,169 @@
|
|
|
1091
1278
|
border-bottom: none;
|
|
1092
1279
|
}
|
|
1093
1280
|
|
|
1281
|
+
/*
|
|
1282
|
+
* Pinned columns. A pinned column's header, body, footer and summary cells
|
|
1283
|
+
* stick to the scroll area's start or end edge, at the
|
|
1284
|
+
* `--gridkit-pin-offset` the grid sets on each: the summed widths of the
|
|
1285
|
+
* columns pinned between it and that edge. The other columns scroll under
|
|
1286
|
+
* them.
|
|
1287
|
+
*
|
|
1288
|
+
* After the header cell's `position: relative`, which this replaces at the
|
|
1289
|
+
* same specificity; sticky is a containing block too, so the resize handle
|
|
1290
|
+
* and the toggles stay inside the cell. `z-index: 1` lifts them over the
|
|
1291
|
+
* scrolling cells, whose positioned header cells would otherwise paint
|
|
1292
|
+
* over a start-pinned one that comes before them, and keeps them under the
|
|
1293
|
+
* header and footer tables (2), which pinned body cells scroll under like
|
|
1294
|
+
* any row.
|
|
1295
|
+
*/
|
|
1296
|
+
.gridkit-data-grid
|
|
1297
|
+
:is(
|
|
1298
|
+
.gridkit-header-cell,
|
|
1299
|
+
.gridkit-grid-cell,
|
|
1300
|
+
.gridkit-grid-footer-cell,
|
|
1301
|
+
.gridkit-grid-group-summary-cell
|
|
1302
|
+
).is-pinned-start {
|
|
1303
|
+
position: sticky;
|
|
1304
|
+
inset-inline-start: var(--gridkit-pin-offset);
|
|
1305
|
+
z-index: 1;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
.gridkit-data-grid
|
|
1309
|
+
:is(
|
|
1310
|
+
.gridkit-header-cell,
|
|
1311
|
+
.gridkit-grid-cell,
|
|
1312
|
+
.gridkit-grid-footer-cell,
|
|
1313
|
+
.gridkit-grid-group-summary-cell
|
|
1314
|
+
).is-pinned-end {
|
|
1315
|
+
position: sticky;
|
|
1316
|
+
inset-inline-end: var(--gridkit-pin-offset);
|
|
1317
|
+
z-index: 1;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
/*
|
|
1321
|
+
* Keeps a cell that keyboard focus or `scrollToColumn` scrolls into view
|
|
1322
|
+
* clear of the pinned columns at both edges. A margin on the scrolling
|
|
1323
|
+
* cells rather than padding on the scroll area: a pinned cell, stuck in
|
|
1324
|
+
* that padding, would scroll the area to make room when focused, as the
|
|
1325
|
+
* header would for `scroll-margin-block` above.
|
|
1326
|
+
*/
|
|
1327
|
+
.gridkit-data-grid
|
|
1328
|
+
:is(.gridkit-header-cell, .gridkit-grid-cell):not(
|
|
1329
|
+
.is-pinned-start,
|
|
1330
|
+
.is-pinned-end
|
|
1331
|
+
) {
|
|
1332
|
+
scroll-margin-inline: var(--gridkit-pinned-start-width, 0px)
|
|
1333
|
+
var(--gridkit-pinned-end-width, 0px);
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/*
|
|
1337
|
+
* Opaque in every row state, without restating a row rule. The cell takes
|
|
1338
|
+
* its row's colour, at no specificity, so a cell's own hover or selection
|
|
1339
|
+
* wins over it. A sticky cell is a stacking context, so its negative-z
|
|
1340
|
+
* pseudo-elements paint above its own background and below its content:
|
|
1341
|
+
* `::before` lays the surface over it and `::after` its colour again on
|
|
1342
|
+
* top. A transparent row shows the surface, a translucent one its colour
|
|
1343
|
+
* over the surface, and neither the cells scrolled underneath. `inset: 0`
|
|
1344
|
+
* covers the padding box, so the borders stay visible; `box-shadow:
|
|
1345
|
+
* inherit` repeats the resize and drop lines `::after` would cover.
|
|
1346
|
+
*/
|
|
1347
|
+
.gridkit-data-grid :where(.is-pinned-start, .is-pinned-end) {
|
|
1348
|
+
background-color: inherit;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.gridkit-data-grid
|
|
1352
|
+
:is(
|
|
1353
|
+
.gridkit-header-cell,
|
|
1354
|
+
.gridkit-grid-cell,
|
|
1355
|
+
.gridkit-grid-footer-cell,
|
|
1356
|
+
.gridkit-grid-group-summary-cell
|
|
1357
|
+
):is(.is-pinned-start, .is-pinned-end)::before,
|
|
1358
|
+
.gridkit-data-grid
|
|
1359
|
+
:is(
|
|
1360
|
+
.gridkit-header-cell,
|
|
1361
|
+
.gridkit-grid-cell,
|
|
1362
|
+
.gridkit-grid-footer-cell,
|
|
1363
|
+
.gridkit-grid-group-summary-cell
|
|
1364
|
+
):is(.is-pinned-start, .is-pinned-end)::after {
|
|
1365
|
+
content: "";
|
|
1366
|
+
position: absolute;
|
|
1367
|
+
inset: 0;
|
|
1368
|
+
pointer-events: none;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
.gridkit-data-grid
|
|
1372
|
+
:is(
|
|
1373
|
+
.gridkit-header-cell,
|
|
1374
|
+
.gridkit-grid-cell,
|
|
1375
|
+
.gridkit-grid-footer-cell,
|
|
1376
|
+
.gridkit-grid-group-summary-cell
|
|
1377
|
+
):is(.is-pinned-start, .is-pinned-end)::before {
|
|
1378
|
+
z-index: -2;
|
|
1379
|
+
background-color: var(--gridkit-surface);
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
.gridkit-data-grid
|
|
1383
|
+
:is(
|
|
1384
|
+
.gridkit-header-cell,
|
|
1385
|
+
.gridkit-grid-cell,
|
|
1386
|
+
.gridkit-grid-footer-cell,
|
|
1387
|
+
.gridkit-grid-group-summary-cell
|
|
1388
|
+
):is(.is-pinned-start, .is-pinned-end)::after {
|
|
1389
|
+
z-index: -1;
|
|
1390
|
+
background-color: inherit;
|
|
1391
|
+
box-shadow: inherit;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
/*
|
|
1395
|
+
* The divider between the pinned columns and the scrolling ones, in every
|
|
1396
|
+
* `borders` setting: the edge cell's own border on the scrolling side,
|
|
1397
|
+
* outranking the column lines above. None where the edge cell ends the
|
|
1398
|
+
* row, which is no seam, and none at the start edge when the end edge cell
|
|
1399
|
+
* comes straight after it, whose divider is then the one line between them.
|
|
1400
|
+
*/
|
|
1401
|
+
.gridkit-data-grid
|
|
1402
|
+
:is(
|
|
1403
|
+
.gridkit-header-cell,
|
|
1404
|
+
.gridkit-grid-cell,
|
|
1405
|
+
.gridkit-grid-footer-cell,
|
|
1406
|
+
.gridkit-grid-group-summary-cell
|
|
1407
|
+
).is-pinned-start.is-pinned-edge:not(:last-child, :has(+ .is-pinned-end)) {
|
|
1408
|
+
border-inline-end: var(--gridkit-border-width) var(--gridkit-border-style)
|
|
1409
|
+
var(--gridkit-line);
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
.gridkit-data-grid
|
|
1413
|
+
:is(
|
|
1414
|
+
.gridkit-header-cell,
|
|
1415
|
+
.gridkit-grid-cell,
|
|
1416
|
+
.gridkit-grid-footer-cell,
|
|
1417
|
+
.gridkit-grid-group-summary-cell
|
|
1418
|
+
).is-pinned-end.is-pinned-edge:not(:first-child) {
|
|
1419
|
+
border-inline-start: var(--gridkit-border-width) var(--gridkit-border-style)
|
|
1420
|
+
var(--gridkit-line);
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/*
|
|
1424
|
+
* The cell before the end divider leaves out its own column line, which
|
|
1425
|
+
* would sit beside the divider as a doubled one wherever the two meet:
|
|
1426
|
+
* scrolled to the end, and in a grid with nothing to scroll.
|
|
1427
|
+
*/
|
|
1428
|
+
.gridkit-data-grid
|
|
1429
|
+
:is(
|
|
1430
|
+
.gridkit-header-cell,
|
|
1431
|
+
.gridkit-grid-cell,
|
|
1432
|
+
.gridkit-grid-footer-cell,
|
|
1433
|
+
.gridkit-grid-group-summary-cell
|
|
1434
|
+
):has(+ .is-pinned-end.is-pinned-edge) {
|
|
1435
|
+
border-inline-end: none;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1094
1438
|
/*
|
|
1095
1439
|
* The toolbar: the grid's first child, above the group-by bar, and unscoped
|
|
1096
|
-
* by `.gridkit-data-grid` for the same reason that bar is.
|
|
1097
|
-
*
|
|
1098
|
-
*
|
|
1440
|
+
* by `.gridkit-data-grid` for the same reason that bar is. It sits outside
|
|
1441
|
+
* the tables' scroll area, so it stays in view while they scroll, and it
|
|
1442
|
+
* sticks to the viewport's start edge for the rare grid whose viewport
|
|
1443
|
+
* scrolls sideways itself, under a group-by bar wider than it.
|
|
1099
1444
|
*
|
|
1100
1445
|
* Its entries keep to one row at their own widths, which is what the
|
|
1101
1446
|
* overflow measures: what does not fit goes into "More", and `overflow:
|
|
@@ -1326,13 +1671,13 @@
|
|
|
1326
1671
|
}
|
|
1327
1672
|
|
|
1328
1673
|
.gridkit-group-by-chip.is-drop-before::before {
|
|
1329
|
-
|
|
1674
|
+
inset-inline-start: calc(
|
|
1330
1675
|
var(--gridkit-spacing) * -1 - var(--gridkit-indicator-width) / 2
|
|
1331
1676
|
);
|
|
1332
1677
|
}
|
|
1333
1678
|
|
|
1334
1679
|
.gridkit-group-by-chip.is-drop-after::after {
|
|
1335
|
-
|
|
1680
|
+
inset-inline-end: calc(
|
|
1336
1681
|
var(--gridkit-spacing) * -1 - var(--gridkit-indicator-width) / 2
|
|
1337
1682
|
);
|
|
1338
1683
|
}
|
|
@@ -1346,6 +1691,7 @@
|
|
|
1346
1691
|
.gridkit-group-by-chip.gridkit-drag-ghost {
|
|
1347
1692
|
position: fixed;
|
|
1348
1693
|
top: 0;
|
|
1694
|
+
/* Physical for the header ghost's reason. */
|
|
1349
1695
|
left: 0;
|
|
1350
1696
|
z-index: 50;
|
|
1351
1697
|
border: var(--gridkit-border-width) dashed var(--gridkit-accent);
|
|
@@ -1678,6 +2024,10 @@
|
|
|
1678
2024
|
color: var(--gridkit-fg-muted);
|
|
1679
2025
|
}
|
|
1680
2026
|
|
|
2027
|
+
.gridkit-menu-submenu-indicator:dir(rtl) svg {
|
|
2028
|
+
transform: scaleX(-1);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
1681
2031
|
.gridkit-menu-separator {
|
|
1682
2032
|
height: var(--gridkit-border-width);
|
|
1683
2033
|
margin: var(--gridkit-spacing) 0;
|
|
@@ -2030,6 +2380,11 @@
|
|
|
2030
2380
|
margin-inline-start: auto;
|
|
2031
2381
|
}
|
|
2032
2382
|
|
|
2383
|
+
.gridkit-filter-menu-submenu-indicator:dir(rtl) svg,
|
|
2384
|
+
.gridkit-filter-menu-back-icon:dir(rtl) svg {
|
|
2385
|
+
transform: scaleX(-1);
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2033
2388
|
.gridkit-filter-menu-search {
|
|
2034
2389
|
box-sizing: border-box;
|
|
2035
2390
|
width: 100%;
|
|
@@ -2250,13 +2605,38 @@
|
|
|
2250
2605
|
display: none;
|
|
2251
2606
|
}
|
|
2252
2607
|
|
|
2253
|
-
/*
|
|
2608
|
+
/*
|
|
2609
|
+
* No height bound, and nothing scrolls or sticks, so no row is cut off
|
|
2610
|
+
* or printed over, and the footer follows the last row.
|
|
2611
|
+
*/
|
|
2254
2612
|
.gridkit-data-grid-viewport,
|
|
2255
|
-
.gridkit-data-grid-viewport .gridkit-data-grid-
|
|
2613
|
+
.gridkit-data-grid-viewport .gridkit-data-grid-tables {
|
|
2256
2614
|
height: auto;
|
|
2257
2615
|
overflow: visible;
|
|
2258
2616
|
}
|
|
2259
2617
|
|
|
2618
|
+
.gridkit-data-grid-viewport .gridkit-data-grid-header,
|
|
2619
|
+
.gridkit-data-grid-viewport .gridkit-data-grid-footer,
|
|
2620
|
+
.gridkit-data-grid-viewport .gridkit-grid-group-cell-content {
|
|
2621
|
+
position: static;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
/*
|
|
2625
|
+
* Pinned columns print in their own places. Relative rather than
|
|
2626
|
+
* static: a cell stays the containing block of its background layers
|
|
2627
|
+
* and its header's toggles, as an unpinned header cell is.
|
|
2628
|
+
*/
|
|
2629
|
+
.gridkit-data-grid-viewport
|
|
2630
|
+
.gridkit-data-grid
|
|
2631
|
+
:is(.is-pinned-start, .is-pinned-end) {
|
|
2632
|
+
position: relative;
|
|
2633
|
+
inset-inline: auto;
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
.gridkit-data-grid-viewport .gridkit-data-grid-body {
|
|
2637
|
+
min-height: 0;
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2260
2640
|
.gridkit-data-grid-viewport :focus-visible {
|
|
2261
2641
|
outline: none;
|
|
2262
2642
|
}
|