feat: author-colored track-changes CSS for the preview (human green/red, Claude blue/purple)
This commit is contained in:
+30
-20
@@ -18,19 +18,35 @@ body {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
#cw-summary .cw-add { color: var(--vscode-gitDecoration-addedResourceForeground); }
|
/* Author-colored track changes — style = operation, color = author.
|
||||||
#cw-summary .cw-del { color: var(--vscode-gitDecoration-deletedResourceForeground); }
|
underline = inserted, strikethrough = removed; human green/red, Claude blue/purple. */
|
||||||
|
#cw-summary .cw-add { color: #3fb950; }
|
||||||
|
#cw-summary .cw-del { color: #f85149; }
|
||||||
.cw-blk { position: relative; }
|
.cw-blk { position: relative; }
|
||||||
ins, .cw-added {
|
|
||||||
background: var(--vscode-diffEditor-insertedTextBackground, rgba(0, 255, 0, 0.15));
|
/* base ins/del carry the operation; author classes carry the color */
|
||||||
text-decoration: none;
|
ins { text-decoration: none; }
|
||||||
}
|
del { text-decoration: line-through; opacity: 0.7; }
|
||||||
del, .cw-removed {
|
|
||||||
background: var(--vscode-diffEditor-removedTextBackground, rgba(255, 0, 0, 0.15));
|
.cw-ins-human { background: rgba(63,185,80,0.14); border-bottom: 2px solid #3fb950; text-decoration: none; }
|
||||||
text-decoration: line-through;
|
.cw-ins-claude { background: rgba(88,166,255,0.15); border-bottom: 2px solid #58a6ff; text-decoration: none; }
|
||||||
opacity: 0.7;
|
.cw-ins-none { background: var(--vscode-diffEditor-insertedTextBackground, rgba(63,185,80,0.14)); text-decoration: none; }
|
||||||
}
|
.cw-del-human { background: rgba(248,81,73,0.11); text-decoration: line-through; text-decoration-color: #f85149; }
|
||||||
.cw-changed { outline: 2px solid var(--vscode-diffEditor-insertedTextBackground, rgba(0, 255, 0, 0.25)); outline-offset: 2px; }
|
.cw-del-claude { background: rgba(188,140,255,0.13); text-decoration: line-through; text-decoration-color: #bc8cff; }
|
||||||
|
.cw-del-none { background: var(--vscode-diffEditor-removedTextBackground, rgba(248,81,73,0.11)); text-decoration: line-through; opacity: 0.7; }
|
||||||
|
|
||||||
|
/* whole-block ops: an added block is an insertion (author-colored inside via cw-by-*);
|
||||||
|
a standalone removed block is neutral struck (adjacency heuristic fallback) */
|
||||||
|
.cw-added { background: transparent; }
|
||||||
|
.cw-removed { background: var(--vscode-diffEditor-removedTextBackground, rgba(248,81,73,0.10)); text-decoration: line-through; opacity: 0.65; }
|
||||||
|
.cw-changed { outline: none; }
|
||||||
|
|
||||||
|
/* added-block author runs (colorByAuthor sentinels) read as insertions */
|
||||||
|
.cw-by-human { background: rgba(63,185,80,0.14); border-bottom: 2px solid #3fb950; text-decoration: none; }
|
||||||
|
.cw-by-claude { background: rgba(88,166,255,0.15); border-bottom: 2px solid #58a6ff; text-decoration: none; }
|
||||||
|
.cw-blk.cw-by-claude, .cw-blk.cw-by-human, .cw-blk.cw-mixed { outline: 2px solid currentColor; outline-offset: 2px; background: transparent; }
|
||||||
|
#cw-legend .cw-swatch { padding: 0 0.4em; border-radius: 3px; }
|
||||||
|
#cw-summary .cw-prop { opacity: 0.85; }
|
||||||
.cw-badge {
|
.cw-badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -52,12 +68,6 @@ del, .cw-removed {
|
|||||||
pre.mermaid { text-align: center; background: transparent; }
|
pre.mermaid { text-align: center; background: transparent; }
|
||||||
pre.mermaid[data-cw-error] { color: var(--vscode-errorForeground); }
|
pre.mermaid[data-cw-error] { color: var(--vscode-errorForeground); }
|
||||||
|
|
||||||
/* F9 authorship mode — inline author tints + block-level fence badges + toggle. */
|
|
||||||
.cw-by-claude { background: var(--vscode-editorInfo-foreground, rgba(64, 120, 242, 0.18)); text-decoration: none; }
|
|
||||||
.cw-by-human { background: var(--vscode-gitDecoration-addedResourceForeground, rgba(46, 160, 67, 0.18)); text-decoration: none; }
|
|
||||||
.cw-blk.cw-by-claude, .cw-blk.cw-by-human, .cw-blk.cw-mixed { outline: 2px solid currentColor; outline-offset: 2px; background: transparent; }
|
|
||||||
#cw-legend .cw-swatch { padding: 0 0.4em; border-radius: 3px; }
|
|
||||||
#cw-summary .cw-prop { opacity: 0.85; }
|
|
||||||
|
|
||||||
/* F11 — preview toolbar buttons (Pin baseline; adaptive Ask Claude). Theme-aware. */
|
/* F11 — preview toolbar buttons (Pin baseline; adaptive Ask Claude). Theme-aware. */
|
||||||
#cw-header button {
|
#cw-header button {
|
||||||
@@ -76,8 +86,8 @@ pre.mermaid[data-cw-error] { color: var(--vscode-errorForeground); }
|
|||||||
#cw-toggle { display: inline-flex; align-items: center; gap: 0.35em; cursor: pointer; }
|
#cw-toggle { display: inline-flex; align-items: center; gap: 0.35em; cursor: pointer; }
|
||||||
.cw-proposal {
|
.cw-proposal {
|
||||||
position: relative;
|
position: relative;
|
||||||
border-left: 3px solid var(--vscode-charts-blue, #4daafc);
|
border-left: 3px solid var(--vscode-panel-border, #555);
|
||||||
background: color-mix(in srgb, var(--vscode-charts-blue, #4daafc) 12%, transparent);
|
background: color-mix(in srgb, var(--vscode-foreground) 5%, transparent);
|
||||||
padding: 0.4em 0.6em; margin: 0.4em 0; border-radius: 3px;
|
padding: 0.4em 0.6em; margin: 0.4em 0; border-radius: 3px;
|
||||||
}
|
}
|
||||||
.cw-proposal-unanchored { border-left-style: dashed; opacity: 0.85; }
|
.cw-proposal-unanchored { border-left-style: dashed; opacity: 0.85; }
|
||||||
|
|||||||
Reference in New Issue
Block a user