testing: fix transparent background in test error badges artifacting (#236109)

This commit is contained in:
Connor Peet 2024-12-13 15:20:34 -08:00 committed by GitHub
parent 0d676289ff
commit eb70dfe409
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 7 deletions

View File

@ -414,7 +414,6 @@
.monaco-workbench .test-error-content-widget .inner {
margin-left: 20px;
color: var(--vscode-testing-message-error-badgeForeground) !important;
background: var(--vscode-testing-message-error-badgeBackground);
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
padding-right: 3px;
@ -452,7 +451,6 @@
top: -1px;
width: 15px;
left: -10px;
fill: var(--vscode-testing-message-error-badgeBackground);
z-index: -1;
stroke-width: 0.71px; /* 1 / sqrt(2) */
stroke: var(--vscode-testing-message-error-badgeBorder);

View File

@ -183,7 +183,6 @@ export const testStatesToRetiredIconColors: { [K in TestResultState]?: string }
registerThemingParticipant((theme, collector) => {
const editorBg = theme.getColor(editorBackground);
const missBadgeBackground = editorBg && theme.getColor(testingUncoveredBackground)?.transparent(2).makeOpaque(editorBg);
collector.addRule(`
.coverage-deco-inline.coverage-deco-hit.coverage-deco-hovered {
@ -194,9 +193,22 @@ registerThemingParticipant((theme, collector) => {
background: ${theme.getColor(testingUncoveredBackground)?.transparent(1.3)};
outline-color: ${theme.getColor(testingUncoveredBorder)?.transparent(2)};
}
.coverage-deco-branch-miss-indicator::before {
border-color: ${missBadgeBackground?.transparent(1.3)};
background-color: ${missBadgeBackground};
`);
if (editorBg) {
const missBadgeBackground = theme.getColor(testingUncoveredBackground)?.transparent(2).makeOpaque(editorBg);
const errorBadgeBackground = theme.getColor(messageBadgeBackground)?.makeOpaque(editorBg);
collector.addRule(`
.coverage-deco-branch-miss-indicator::before {
border-color: ${missBadgeBackground?.transparent(1.3)};
background-color: ${missBadgeBackground};
}
.monaco-workbench .test-error-content-widget .inner{
background: ${errorBadgeBackground};
}
.monaco-workbench .test-error-content-widget .inner .arrow svg {
fill: ${errorBadgeBackground};
}
`);
}
`);
});