From 2eeac2f8004b132fb7a1c9de946aa42fcd6409d0 Mon Sep 17 00:00:00 2001 From: mamphis Date: Thu, 18 Nov 2021 21:10:09 +0100 Subject: [PATCH 1/3] glyphMargin: Wrapped codicons inside parent div This patch resolves #137436. When multiple classes (e.g. codicon-debug-breakpoint,codicon-debug-hint) are added they would disable the ::after content for consecutive classes for the HTML Element. This patch adds a parent element to the overlay and adds all classes as seperated divs, so they can be drawn on top of each other. --- .../editor/browser/viewParts/glyphMargin/glyphMargin.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts index 761b0ce1afb6c..1d88adbba7d8c 100644 --- a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts +++ b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts @@ -166,7 +166,7 @@ export class GlyphMarginOverlay extends DedupOverlay { const lineHeight = this._lineHeight.toString(); const left = this._glyphMarginLeft.toString(); const width = this._glyphMarginWidth.toString(); - const common = '" style="left:' + left + 'px;width:' + width + 'px' + ';height:' + lineHeight + 'px;">'; + const common = (content: string = '') => `" style="left:${left}px;width:${width}px;height:${lineHeight}px;">${content}`; const output: string[] = []; for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { @@ -176,11 +176,8 @@ export class GlyphMarginOverlay extends DedupOverlay { if (classNames.length === 0) { output[lineIndex] = ''; } else { - output[lineIndex] = ( - '
``; + const common = '" style="left:' + left + 'px;width:' + width + 'px' + ';height:' + lineHeight + 'px;">
'; const output: string[] = []; for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { @@ -176,8 +176,11 @@ export class GlyphMarginOverlay extends DedupOverlay { if (classNames.length === 0) { output[lineIndex] = ''; } else { - // Map codicons inside parent div - output[lineIndex] = `
`; + output[lineIndex] = ( + '