Skip to content

Commit 89dc4b7

Browse files
committed
Fixes color value regression
1 parent 8b68571 commit 89dc4b7

2 files changed

Lines changed: 38 additions & 16 deletions

File tree

src/webviews/apps/plus/graph/components/gl-commits-scope-pane.css.ts

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ const bgColor = unsafeCSS('var(--vscode-sideBar-background, var(--color-backgrou
1010

1111
export const commitsScopePaneStyles = css`
1212
:host {
13+
--details-scope-pane-uncommitted-color: ${uncommittedColor};
14+
--details-scope-pane-unpushed-color: ${unpushedColor};
15+
--details-scope-pane-pushed-color: ${pushedColor};
16+
--details-scope-pane-merge-base-color: ${mergeBaseColor};
17+
--details-scope-pane-connector-pushed-color: ${connectorPushedColor};
18+
--details-scope-pane-bg-color: ${bgColor};
19+
1320
display: flex;
1421
flex: 1;
1522
min-height: 0;
@@ -113,27 +120,27 @@ export const commitsScopePaneStyles = css`
113120
position: absolute;
114121
left: 50%;
115122
width: 2px;
116-
background: postcss_lit_0;
123+
background: var(--details-scope-pane-connector-pushed-color);
117124
transform: translateX(-50%);
118125
}
119126
120127
/* The full gap between two dots takes the UPPER commit's color: the row's
121128
own --below uses its state, and the row's --above uses the previous
122129
row's state. Both segments meet across the row boundary in one color. */
123130
.scope-row[data-state='uncommitted'] .scope-row__connector--below {
124-
background: postcss_lit_1;
131+
background: var(--details-scope-pane-uncommitted-color);
125132
}
126133
127134
.scope-row[data-state='unpushed'] .scope-row__connector--below {
128-
background: postcss_lit_2;
135+
background: var(--details-scope-pane-unpushed-color);
129136
}
130137
131138
.scope-row[data-prev-state='uncommitted'] .scope-row__connector--above {
132-
background: postcss_lit_3;
139+
background: var(--details-scope-pane-uncommitted-color);
133140
}
134141
135142
.scope-row[data-prev-state='unpushed'] .scope-row__connector--above {
136-
background: postcss_lit_4;
143+
background: var(--details-scope-pane-unpushed-color);
137144
}
138145
139146
/* Connectors stop short of the dot edge (dot radius 0.6rem + 2px gap) so
@@ -221,16 +228,16 @@ export const commitsScopePaneStyles = css`
221228
left: calc(1.2rem + 7px);
222229
width: 2px;
223230
content: '';
224-
background: postcss_lit_5;
231+
background: var(--details-scope-pane-connector-pushed-color);
225232
transform: translateX(-50%);
226233
}
227234
228235
.scope-handle[data-state='uncommitted']::before {
229-
background: postcss_lit_6;
236+
background: var(--details-scope-pane-uncommitted-color);
230237
}
231238
232239
.scope-handle[data-state='unpushed']::before {
233-
background: postcss_lit_7;
240+
background: var(--details-scope-pane-unpushed-color);
234241
}
235242
236243
.scope-handle__bar {
@@ -285,12 +292,22 @@ export const commitsScopePaneStyles = css`
285292
286293
.scope-handle--proxy-start {
287294
top: 0;
288-
background: linear-gradient(to bottom, postcss_lit_8 0%, postcss_lit_9 60%, transparent 100%);
295+
background: linear-gradient(
296+
to bottom,
297+
var(--details-scope-pane-bg-color) 0%,
298+
var(--details-scope-pane-bg-color) 60%,
299+
transparent 100%
300+
);
289301
}
290302
291303
.scope-handle--proxy-end {
292304
bottom: 0;
293-
background: linear-gradient(to top, postcss_lit_10 0%, postcss_lit_11 60%, transparent 100%);
305+
background: linear-gradient(
306+
to top,
307+
var(--details-scope-pane-bg-color) 0%,
308+
var(--details-scope-pane-bg-color) 60%,
309+
transparent 100%
310+
);
294311
}
295312
296313
.scope-handle--proxy .scope-handle__bar {
@@ -329,25 +346,25 @@ export const commitsScopePaneStyles = css`
329346
330347
/* Uncommitted: hollow ring in amber to read as the WIP/in-flight marker. */
331348
.scope-row[data-state='uncommitted'] .dot-uncommitted {
332-
background: postcss_lit_13;
333-
border: 2px dotted postcss_lit_12;
349+
background: var(--details-scope-pane-bg-color);
350+
border: 2px dotted var(--details-scope-pane-uncommitted-color);
334351
}
335352
336353
/* Unpushed: filled in tracking-ahead teal — matches ahead-tracking pills. */
337354
.scope-row[data-state='unpushed'] .dot-unpushed {
338-
background: postcss_lit_15;
339-
border: 3px solid postcss_lit_14;
355+
background: var(--details-scope-pane-bg-color);
356+
border: 3px solid var(--details-scope-pane-unpushed-color);
340357
}
341358
342359
/* Pushed: muted filled circle — pushed commits are context, not focus. */
343360
.scope-row[data-state='pushed'] .dot-pushed {
344-
background: postcss_lit_16;
361+
background: var(--details-scope-pane-pushed-color);
345362
}
346363
347364
/* Merge base: open ring in a quieter foreground tone — reads as a
348365
boundary marker, not another commit dot. */
349366
.scope-row[data-state='merge-base'] .dot-merge-base {
350-
background: postcss_lit_17;
367+
background: var(--details-scope-pane-merge-base-color);
351368
}
352369
353370
/* Merge base row — matches the --excluded/--loading pattern so any

stylelint.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ export default {
102102
'no-empty-source': null,
103103
// postcss-lit substitutes `${…}` interpolations with placeholder tokens this rule can't validate
104104
'declaration-property-value-no-unknown': null,
105+
// `value-keyword-case`'s --fix rewrites every declaration value; under postcss-lit that write-back
106+
// clobbers the `${…}` interpolation placeholders and persists raw `postcss_lit_N` tokens to source
107+
// (corrupting `unsafeCSS` color vars). Disable it on the Lit surface — authors already write
108+
// keywords lowercase, so there's nothing to gain and a real corruption vector to lose.
109+
'value-keyword-case': null,
105110
},
106111
},
107112
{

0 commit comments

Comments
 (0)