Skip to content

Commit

Permalink
Revert more specific class names for editor tokens
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mjbvz committed Sep 8, 2020
1 parent 3dc43cb commit e370f39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vs/editor/common/modes/supports/tokenization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ export function generateTokensCSSForColorMap(colorMap: Color[]): string {
let rules: string[] = [];
for (let i = 1, len = colorMap.length; i < len; i++) {
let color = colorMap[i];
rules[i] = `.monaco-editor .mtk${i} { color: ${color}; }`;
rules[i] = `.mtk${i} { color: ${color}; }`;
}
rules.push('.monaco-editor .mtki { font-style: italic; }');
rules.push('.monaco-editor .mtkb { font-weight: bold; }');
rules.push('.monaco-editor .mtku { text-decoration: underline; text-underline-position: under; }');
rules.push('.mtki { font-style: italic; }');
rules.push('.mtkb { font-weight: bold; }');
rules.push('.mtku { text-decoration: underline; text-underline-position: under; }');
return rules.join('\n');
}

0 comments on commit e370f39

Please sign in to comment.