Skip to content

Commit 9a94e29

Browse files
committed
Revert more specific class names for editor tokens
Reverts #103485 Fixes #106261 I believe that #103485 broke cases where the markdown renderer creates tokenized strings that are used outside of an editor's dom node (such as in hovers or in webviews) The safest fix for now is to revert it. We can revist this and make the markdown renderer handle the tokenized output better next iteration
1 parent f7c5fc7 commit 9a94e29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/editor/common/modes/supports/tokenization.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,10 @@ export function generateTokensCSSForColorMap(colorMap: Color[]): string {
399399
let rules: string[] = [];
400400
for (let i = 1, len = colorMap.length; i < len; i++) {
401401
let color = colorMap[i];
402-
rules[i] = `.monaco-editor .mtk${i} { color: ${color}; }`;
402+
rules[i] = `.mtk${i} { color: ${color}; }`;
403403
}
404-
rules.push('.monaco-editor .mtki { font-style: italic; }');
405-
rules.push('.monaco-editor .mtkb { font-weight: bold; }');
406-
rules.push('.monaco-editor .mtku { text-decoration: underline; text-underline-position: under; }');
404+
rules.push('.mtki { font-style: italic; }');
405+
rules.push('.mtkb { font-weight: bold; }');
406+
rules.push('.mtku { text-decoration: underline; text-underline-position: under; }');
407407
return rules.join('\n');
408408
}

0 commit comments

Comments
 (0)