Icon font size in label is to small (#234088)

This commit is contained in:
Martin Aeschlimann
2024-11-18 14:16:14 +01:00
committed by GitHub
parent fc121ef8e5
commit d2d60bcc33
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -65,9 +65,9 @@ export function asCSSUrl(uri: URI | null | undefined): CssFragment {
return inline`url(${stringValue(FileAccess.uriToBrowserUri(uri).toString(true))})`;
}
export function className(value: string): CssFragment {
export function className(value: string, escapingExcected = false): CssFragment {
const out = CSS.escape(value);
if (out !== value) {
if (!escapingExcected && out !== value) {
console.warn(`CSS class name ${value} modified to ${out} to be safe for CSS`);
}
return asFragment(out);
@@ -407,7 +407,7 @@ export class FileIconThemeLoader {
fontSizes.set(font.id, fontSize);
}
});
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)}; }`);
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)}; }`);
}
// 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 {
function classSelectorPart(str: string): css.CssFragment {
str = fileIconSelectorEscape(str);
return css.className(str);
return css.className(str, true);
}