summaryrefslogtreecommitdiff
path: root/web/src/components/grid/index.css
blob: c29f55d3d23b60d8b0ece661cf2eba9e6a491e27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@layer components {
  ntv-grid {
    display: block;
    position: relative;

    --grid-bg-fill: var(--color-neutral-900);
    --grid-border-stroke: var(--color-neutral-700);
    --grid-cell-stroke: var(--color-neutral-800);
    --grid-active-cell-stroke: var(--color-green-400);
    --grid-selection-range-fill: color-mix(
      in oklab,
      var(--color-green-400) 10%,
      transparent
    );
    --grid-selection-range-stroke: var(--color-green-400);
    font-size: 14px;
  }

  ntv-grid > canvas {
    display: block;
  }

  ntv-grid > canvas[data-selection] {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
  }

  :has(ntv-grid:state(selecting))
    > ntv-grid:not(:state(selecting))
    > canvas[data-selection] {
    display: none;
  }

  ntv-grid input[data-edit] {
    position: absolute;
    vertical-align: baseline;
    background: var(--color-neutral-800);
    padding-right: 1px;
    padding-bottom: 1px;
    color: white;
    text-align: center;
  }

  ntv-grid input[data-edit]:focus-visible {
    outline: none;
  }
}