File size: 6,246 Bytes
1d4419b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/* wave 51 -- lane A (the Data module client and the record view).
   Pre-created at the wave base with its @import in index.css so no lane edits index.css
   (a shared file is a merge collision). Tokens only: var(--lp-*), var(--cg-z-*); no literal
   font-size (verify_ui goes RED), no hex, no text-transform: uppercase (DESIGN.md section 2). */

/* ⭐⭐ W51-T03 / R6 + C8 β€” the one-line body of a grid confirm dialog.
   β›” ONE RULE, NOT A COMPONENT. `.lp-dialog-body` in kit.css already owns the body's padding,
   scale and rhythm; all this adds is the paragraph reset a <p> needs inside it, so the delete
   count and the record note sit on the same baseline as `ViewDeleteDisclosure`'s facts line.
   ⚠ GLOBAL BY NECESSITY, like the kit's own rules: `ConfirmDialog` renders through `BodyPortal`,
   so it is a direct child of <body> and every descendant-scoped selector is dead to it
   ([[a-portal-overlay-carries-its-own-surface]]). This file is imported from index.css.
   ⚠ NO font-size here. The scale comes from `.lp-dialog-body`; a literal one reds verify_ui. */
.cg-dialog-line {
  margin: 0;
  color: var(--lp-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════
   ⭐⭐ W51-T06 (R2 / R5, contract C6) β€” THE RECORD VIEW'S RELATED TABS AND THE PINNED CHIP.
   ═══════════════════════════════════════════════════════════════════════════════════════════ */

/* ⭐⭐ CLAUSE 5 β€” THE PIN IS THE FIRST CHIP **IN** THE FILTER BAR, NOT A SECOND ROW ABOVE IT.
   β›”β›” `display: contents` IS THE WHOLE OF THE BLAST-RADIUS CONTROL, and it is deliberate rather
   than exotic. `.cg-toolbar` is `container-type: inline-size` with a family of `> child` and
   `:has(> …)` rules across four wave stylesheets, and it is a direct flex child of `.cg-main`
   (a column). A wrapper that laid out would change that for EVERY grid in the product to serve
   one mode. `display: contents` removes the wrapper from layout entirely, so on every surface
   that is not a related tab the toolbar stays exactly the direct flex child it has always been:
   same container query, same `:has()` matches, same order integers.
   ⚠ The `:has()` test is on the CHIP, not on a modifier class, so the two can never disagree
   about whether the bar is pinned: the rule is true exactly when the chip is in the DOM. */
.cg-relpin-bar {
  display: contents;
}

.cg-relpin-bar:has(> .cg-relpin-chip) {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  gap: 8px;
  padding-left: 10px;
  background: var(--lp-surface);
  border-bottom: 1px solid var(--lp-line);
}

/* The strip's hairline moves to the wrapper so the chip and the controls sit under ONE line
   rather than the chip floating beside a bordered box. `min-width: 0` is not optional: without
   it the toolbar's `container-type: inline-size` cannot shrink below its content and the strip
   overflows the panel instead of collapsing to icons the way it is designed to. */
.cg-relpin-bar:has(> .cg-relpin-chip) > .cg-toolbar {
  flex: 1 1 auto;
  min-width: 0;
  border-bottom: 0;
  padding-left: 4px;
}

/* ⭐ A LOCKED VIEW'S CHIP: a mark, a sentence, and NO REMOVE CONTROL. It is a <span> and not a
   <button> for exactly that reason β€” you are reading one record, so the row set is the premise
   and there is no state where it is off. Yellow, matching `.cg-lock-tag` and `.cg-flt-lockchip`
   rather than inventing a colour: all three say the same thing about the same kind of thing. */
.cg-relpin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 40%;
  padding: 3px 8px;
  border-radius: var(--lp-r-sm);
  background: var(--lp-yellow-tint);
  color: var(--lp-yellow-deep);
  font-size: var(--lp-fs-3xs);
  font-weight: 600;
  line-height: 1.4;
}

/* A long record name truncates rather than pushing the controls off the strip: the toolbar
   never scrolls sideways (index.css, wave-15 item 11) and a chip that could shove it is the
   same defect from the other end. The full name is on the record's own title. */
.cg-relpin-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ⭐ CLAUSE 2 β€” the tab's two lines. The subtitle exists only where two edges share one target,
   so it is a child element rather than a modifier: absent from the DOM, absent from the box. */
.cg-record-tab--rel {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
}

.cg-record-tab-sub {
  font-size: var(--lp-fs-3xs);
  font-weight: 400;
  color: var(--lp-muted);
  line-height: 1.2;
}

/* ⭐ CLAUSE 4 + CLAUSE 12 β€” THE GRID IS THE PANEL.
   β›” NO BORDER, NO RADIUS, NO SHADOW. DESIGN section 4 allows ONE containment layer and the
   record drawer is already it; a bordered box around a grid inside a drawer inside a modal is
   the card-in-card the section names by name. What this rule does is give the mounted grid a
   BOX TO FILL: `.cg-shell` is `height: 100%` and would collapse to nothing inside a scrolling
   body, so the tab owns the height and the grid owns its own internal scrolling.
   ⚠ The drawer's own anatomy is untouched: `.cg-record-layout` still shrinks `.cg-record-main`
   beside the comments rail, and this lives INSIDE that main column. */
.cg-record-related {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.cg-record-related > .cg-shell {
  flex: 1 1 auto;
  min-height: 0;
}

/* DESIGN section 4, never over-explain: a tab that cannot be served yet is ONE line carrying the
   server's own sentence, in the panel's ordinary muted voice. Not an error tone: a declared
   relation whose read is not built yet is a reported boundary, not a failure. */
.cg-record-related-note {
  margin: 0;
  padding: 16px;
  color: var(--lp-muted);
  line-height: 1.5;
}