File size: 9,200 Bytes
2183dbe | 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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | /* wave 41 lane stylesheet: relational. Kept separate so no lane edits index.css.
Tokens live in index.css :root and customer-grid/theme.ts -- declare there, consume here. */
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
W41-T42 -- the Relational pivot (owner instruction 23, rulings R9/R10/R11).
THE CASCADE RULE THIS FILE HAS TO OBEY, MEASURED RATHER THAN ASSUMED. index.css imports this
sheet from line 13, inside the @import block at the very top of the file, because an @import
must precede every other at-rule. Everything index.css declares is therefore LATER than
everything here, so at EQUAL specificity index.css wins and a rule written here is dead.
That is a rule about TIES, not about this sheet being powerless:
.cg-tb-btn--relational.is-active (0,2,0) LOSES to .cg-tb-btn.is-active (0,2,0)
.cg-toolbar.cg-toolbar--frozen (0,2,0) BEATS .cg-toolbar (0,1,0)
.cg-toolbar--frozen .cg-tb-btn (0,2,0) BEATS .cg-tb-btn (0,1,0)
.cg-toolbar--frozen .cg-tb-btn.is-active (0,3,0) BEATS .cg-tb-btn.is-active (0,2,0)
So a NEW class name, or an existing one qualified by a new ancestor, works from here. Only a
like-for-like override of an existing selector does not, which is why this ticket takes the
neutral blue active state for the Relational button instead of declaring a tone.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
/* ββ R11: the PRIMARY control row under an active pivot ββββββββββββββββββββββββββββββββββββββ
Visible, greyed, and inert. `inert` on the element is what actually removes it from hit
testing, tab order and the accessibility tree; `pointer-events` here is the mouse-only
fallback for a browser that does not implement it, and the greying is what says so on screen. */
.cg-toolbar.cg-toolbar--frozen {
background: var(--lp-wash);
pointer-events: none;
user-select: none;
}
.cg-toolbar--frozen .cg-tb-btn,
.cg-toolbar--frozen .cg-tb-btn.is-active,
.cg-toolbar--frozen .cg-tb-lock,
.cg-toolbar--frozen .cg-count,
.cg-toolbar--frozen .cg-search-input {
background: transparent;
color: var(--lp-muted);
cursor: default;
}
.cg-toolbar--frozen .cg-tb-btn svg,
.cg-toolbar--frozen .cg-tb-btn.is-active svg {
color: var(--lp-muted);
}
/* ββ the pivot itself, standing in the grid's own box βββββββββββββββββββββββββββββββββββββββ */
.cg-rel-surface {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
background: var(--lp-surface);
color: var(--lp-ink);
font-size: var(--lp-fs-xs);
}
/* The header states the path and both counts. One line, quiet, on the wash the note stratum
already uses so it reads as a label on the table rather than as an alert above it. */
.cg-rel-head {
flex: 0 0 auto;
display: flex;
align-items: baseline;
gap: 12px;
padding: 8px 12px;
background: var(--lp-wash);
border-bottom: 1px solid var(--lp-line);
min-width: 0;
}
.cg-rel-path {
font-weight: 600;
color: var(--lp-ink);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.cg-rel-counts {
color: var(--lp-muted);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.cg-rel-window {
margin-left: auto;
color: var(--lp-muted);
font-size: var(--lp-fs-2xs);
white-space: nowrap;
}
/* DESIGN section 4, never over-explain: every one of these states is ONE line. */
.cg-rel-note {
flex: 0 0 auto;
padding: 12px;
color: var(--lp-muted);
line-height: var(--lp-lh);
}
.cg-rel-note[role="alert"] {
color: var(--lp-red-deep);
background: var(--lp-red-tint);
}
/* Rows scroll INSIDE their own box, so the surface never grows a horizontal scrollbar of its
own and the header stays put while the table moves. */
.cg-rel-rows {
flex: 1 1 auto;
min-height: 0;
overflow: auto;
}
.cg-rel-table {
border-collapse: collapse;
width: 100%;
font-size: var(--lp-fs-xs);
}
.cg-rel-table th,
.cg-rel-table td {
text-align: left;
padding: 6px 12px;
border-bottom: 1px solid var(--lp-line);
white-space: nowrap;
max-width: 320px;
overflow: hidden;
text-overflow: ellipsis;
}
.cg-rel-table th {
position: sticky;
top: 0;
z-index: 1;
background: var(--lp-surface-2);
color: var(--lp-muted);
font-weight: 600;
}
.cg-rel-table tbody tr:hover td {
background: var(--lp-blue-tint);
}
/* One line plus the ACTION. The way back has to exist in this region too: when the pivot could
not be served there is no secondary control row, and the primary one is inert. */
.cg-rel-back {
flex: 0 0 auto;
padding: 8px 12px;
border-top: 1px solid var(--lp-line);
}
.cg-rel-back-btn {
/* DESIGN section 4: a button resets native chrome before it is styled. */
border: 0;
background: transparent;
font: inherit;
color: var(--lp-blue-solid);
padding: 4px 6px;
border-radius: var(--lp-r-sm);
cursor: pointer;
}
.cg-rel-back-btn:hover {
background: var(--lp-blue-tint);
}
.cg-rel-back-btn:focus-visible {
outline: 2px solid var(--lp-blue-deep);
outline-offset: 1px;
}
/* The window group inside the Relational popover is a second question under the first, so it
gets the separation the eye needs and nothing else. */
.cg-pop-title.cg-rel-window-title {
margin-top: 10px;
padding-top: 8px;
border-top: 1px solid var(--lp-line);
}
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
W41-T44 -- the RECORD-LEVEL pivot, inside the record drawer's Details pane.
THE ONE THING THIS BLOCK HAS TO GET RIGHT. Every `.cg-rel-*` rule above was written for the
pivot standing in the GRID's own box, where `.cg-rel-surface` is `position: absolute; inset:
0` and its children are flex items of a fixed-height column. The Details pane is neither: it
is a normal document flow inside a scrolling panel, so a child that says `flex: 1 1 auto` has
nothing to fill and a table with no bound grows until it buries the sections beneath it.
`.cg-detail-linkgrid` above solved the same problem for the embedded grids with a fixed
viewport, and this takes the same answer.
β EVERY RULE HERE IS ANCESTOR-SCOPED BY `.cg-rel-record`, which is what makes it win. Read the
cascade table at the top of this file: a like-for-like override of `.cg-rel-note` (0,1,0)
written here would tie with the copy in this same sheet and be decided by source order, which
is a coin toss nobody should have to reason about. `.cg-rel-record .cg-rel-note` is (0,2,0)
and beats it outright; the `[role="alert"]` variant needs (0,3,0) for the same reason, because
`.cg-rel-note[role="alert"]` is already (0,2,0).
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
.cg-detail-relsec {
display: flex;
flex-direction: column;
gap: 8px;
}
.cg-rel-record {
display: flex;
flex-direction: column;
min-width: 0;
font-size: var(--lp-fs-xs);
}
/* DESIGN section 4, never over-explain: every state in this section is ONE line. The padding is
vertical only, because in the pane these notes sit in the section's own left margin rather
than inside a bordered box the way the grid's do. */
.cg-rel-record .cg-rel-note {
margin: 0;
padding: 8px 0;
}
/* The refusal is the one state that carries a tint, so it is the one that needs a box to hold
it. Horizontal padding is restored here and nowhere else. */
.cg-rel-record .cg-rel-note[role="alert"] {
padding: 8px 10px;
border-radius: var(--lp-r-sm);
}
/* The path-and-counts line reads as a caption over the table, so it loses the divider it wears
in the grid (there it is welded to the rows; here a gap separates them). */
.cg-rel-record .cg-rel-head {
margin-top: 8px;
border-bottom: 0;
border-radius: var(--lp-r-md);
}
/* THE BOUND. Without a maximum this table is as tall as the answer, and one 500-row pivot would
push the time series off the end of the pane. It scrolls inside its own box, so the pane's own
scrollbar still belongs to the pane. */
.cg-rel-record .cg-rel-rows {
max-height: 320px;
margin-top: 6px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
}
|