documentation/components/source/outline-panel.css

1/* The composition as an outline. Rows are flat and square: a selected row
2   has a wash and stronger words, a move's destination a dashed underline,
3   and keyboard focus the ring. Each survives without color. */
4.outline ul {
5  list-style: none;
6  margin: 0;
7  padding: 0;
8}
9.outline-row {
10  display: flex;
11  align-items: baseline;
12  gap: 8px;
13  inline-size: 100%;
14  padding-block: 6px;
15  /* Script states how deeply a node is nested; this gives it a length. */
16  padding-inline: calc(8px + var(--depth, 0) * 16px) 8px;
17  border-radius: 0;
18  color: inherit;
19  font-size: 13px;
20  text-align: start;
21}
22.row-kind {
23  flex: none;
24  color: var(--quiet);
25  font-size: 11px;
26}
27.row-label {
28  min-inline-size: 0;
29  overflow: hidden;
30  text-overflow: ellipsis;
31  white-space: nowrap;
32}
33.outline-row[data-empty] .row-label {
34  color: var(--quiet);
35}
36/* Says in words what a row is during a move: "moving" or "destination". */
37.row-state {
38  flex: none;
39  margin-inline-start: auto;
40  color: var(--ink);
41  font-size: 11px;
42}
43.row-state:empty {
44  display: none;
45}
46.outline-row:hover,
47.outline-row[data-inspected] {
48  background: color-mix(in srgb, var(--ink) 5%, transparent);
49}
50.outline-row[data-chosen="true"] {
51  background: color-mix(in srgb, var(--ink) 11%, transparent);
52}
53.outline-row[data-chosen="true"] .row-label {
54  color: var(--ink);
55  font-weight: 600;
56}
57.outline-row[data-destination] .row-label {
58  text-decoration: underline dashed;
59  text-decoration-thickness: 2px;
60  text-underline-offset: 3px;
61}
62/* Inside the row, so the list's scrolling box cannot clip it. */
63.outline-row:focus-visible {
64  outline: 2px solid var(--ink);
65  outline-offset: -2px;
66}
67@media (forced-colors: active) {
68  /* The wash is not painted here; an underline carries the selection. */
69  .outline-row[data-chosen="true"] .row-label {
70    text-decoration: underline solid;
71    text-decoration-thickness: 2px;
72    text-underline-offset: 3px;
73  }
74  .outline-row[data-destination] .row-label {
75    text-decoration-style: dashed;
76  }
77  .row-state {
78    color: CanvasText;
79  }
80  .outline-row:focus-visible {
81    outline-color: Highlight;
82  }
83}
84@media (pointer: coarse) {
85  .outline-row {
86    align-items: center;
87    min-block-size: 44px;
88  }
89}