Skip to content

Commit 030e841

Browse files
rajbosCopilot
andcommitted
fix: use outline badge style for 'auto' label for reliable dark theme contrast
Badge tokens (--badge-bg/fg) resolved to low-contrast colors in some dark themes. Switch to a theme-agnostic outline style that uses --text-secondary for both the border and text color, with a transparent background. This works in all themes since the color inherits from the editor's description text, which always has sufficient contrast. Also moves the badge styling into a dedicated .auto-badge CSS class instead of inline styles. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 358a271 commit 030e841

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

vscode-extension/src/webview/usage/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function renderToolsTable(byTool: { [key: string]: number }, limit = 10, nameRes
260260
const friendly = escapeHtml(nameResolver(tool));
261261
const idEscaped = escapeHtml(tool);
262262
const autoBadge = AUTOMATIC_TOOL_SET_WV.has(tool)
263-
? `<span title="Automatic tool — Copilot uses this internally and it does not count toward fluency scoring" style="margin-left:6px; padding:1px 5px; font-size:10px; border-radius:3px; background:var(--badge-bg); color:var(--badge-fg); vertical-align:middle;">auto</span>`
263+
? `<span class="auto-badge" title="Automatic tool — Copilot uses this internally and it does not count toward fluency scoring">auto</span>`
264264
: '';
265265
return `
266266
<tr>

vscode-extension/src/webview/usage/styles.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,4 +354,17 @@ background: var(--list-hover-bg);
354354
color: var(--text-primary);
355355
border-bottom-color: var(--link-color);
356356
background: var(--bg-tertiary);
357+
}
358+
359+
.auto-badge {
360+
display: inline-block;
361+
margin-left: 6px;
362+
padding: 1px 5px;
363+
font-size: 10px;
364+
border-radius: 3px;
365+
border: 1px solid var(--text-secondary);
366+
color: var(--text-secondary);
367+
background: transparent;
368+
vertical-align: middle;
369+
line-height: 1.4;
357370
}

0 commit comments

Comments
 (0)