Skip to content

Commit f63ceed

Browse files
author
Matt Bierner
committed
Revert more specific class names for editor tokens
Reverts microsoft#103485 Fixes microsoft#106261 I believe that microsoft#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 7ce6050 commit f63ceed

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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)