Skip to content

Commit d2d60bc

Browse files
authored
Icon font size in label is to small (microsoft#234088)
1 parent fc121ef commit d2d60bc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/vs/base/browser/cssValue.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ export function asCSSUrl(uri: URI | null | undefined): CssFragment {
6565
return inline`url(${stringValue(FileAccess.uriToBrowserUri(uri).toString(true))})`;
6666
}
6767

68-
export function className(value: string): CssFragment {
68+
export function className(value: string, escapingExcected = false): CssFragment {
6969
const out = CSS.escape(value);
70-
if (out !== value) {
70+
if (!escapingExcected && out !== value) {
7171
console.warn(`CSS class name ${value} modified to ${out} to be safe for CSS`);
7272
}
7373
return asFragment(out);

src/vs/workbench/services/themes/browser/fileIconThemeData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ export class FileIconThemeLoader {
407407
fontSizes.set(font.id, fontSize);
408408
}
409409
});
410-
cssRules.push(css.inline`.show-file-icons .file-icon::before, .show-file-icons .folder-icon::before, .show-file-icons .rootfolder-icon::before { font-family: ${css.stringValue(fonts[0].id)}; font-size: ${css.identValue(defaultFontSize)}; }`);
410+
cssRules.push(css.inline`.show-file-icons .file-icon::before, .show-file-icons .folder-icon::before, .show-file-icons .rootfolder-icon::before { font-family: ${css.stringValue(fonts[0].id)}; font-size: ${css.sizeValue(defaultFontSize)}; }`);
411411
}
412412

413413
// Use emQuads to prevent the icon from collapsing to zero height for image icons
@@ -494,5 +494,5 @@ function handleParentFolder(key: string, selectors: css.Builder): string {
494494

495495
function classSelectorPart(str: string): css.CssFragment {
496496
str = fileIconSelectorEscape(str);
497-
return css.className(str);
497+
return css.className(str, true);
498498
}

0 commit comments

Comments
 (0)