Skip to content

Commit

Permalink
Allow decorations to use theme colors. For #26974
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli authored and dbaeumer committed May 26, 2017
1 parent 64e1c20 commit e1e5bf4
Show file tree
Hide file tree
Showing 13 changed files with 442 additions and 289 deletions.
5 changes: 2 additions & 3 deletions src/vs/base/browser/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ export function createCSSRule(selector: string, cssText: string, style: HTMLStyl
return;
}

(<any>style.sheet).insertRule(selector + '{' + cssText + '}', 0);
(<CSSStyleSheet>style.sheet).insertRule(selector + '{' + cssText + '}', 0);
}

export function getCSSRule(selector: string, style: HTMLStyleElement = sharedStyle): any {
Expand Down Expand Up @@ -739,8 +739,7 @@ export function removeCSSRulesContainingSelector(ruleName: string, style = share
let toDelete: number[] = [];
for (let i = 0; i < rules.length; i++) {
let rule = rules[i];
let normalizedSelectorText = rule.selectorText.replace(/::/gi, ':');
if (normalizedSelectorText.indexOf(ruleName) !== -1) {
if (rule.selectorText.indexOf(ruleName) !== -1) {
toDelete.push(i);
}
}
Expand Down
Loading

0 comments on commit e1e5bf4

Please sign in to comment.