mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-30 06:58:55 +01:00
Make mtk classes more specific to avoid CSS conflicts
This commit is contained in:
@@ -397,12 +397,13 @@ export class ThemeTrieElement {
|
||||
|
||||
export function generateTokensCSSForColorMap(colorMap: Color[]): string {
|
||||
let rules: string[] = [];
|
||||
const editorParentClass = ".monaco-editor";
|
||||
for (let i = 1, len = colorMap.length; i < len; i++) {
|
||||
let color = colorMap[i];
|
||||
rules[i] = `.mtk${i} { color: ${color}; }`;
|
||||
rules[i] = `${editorParentClass} .mtk${i} { color: ${color}; }`;
|
||||
}
|
||||
rules.push('.mtki { font-style: italic; }');
|
||||
rules.push('.mtkb { font-weight: bold; }');
|
||||
rules.push('.mtku { text-decoration: underline; text-underline-position: under; }');
|
||||
rules.push(`${editorParentClass} .mtki { font-style: italic; }`);
|
||||
rules.push(`${editorParentClass} .mtkb { font-weight: bold; }`);
|
||||
rules.push(`${editorParentClass} .mtku { text-decoration: underline; text-underline-position: under; }`);
|
||||
return rules.join('\n');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user