mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
update style.textContent instead of calling insertRule, #75061
this change makes style changes visible to the mutation observer
This commit is contained in:
@@ -804,8 +804,7 @@ export function createCSSRule(selector: string, cssText: string, style: HTMLStyl
|
||||
if (!style || !cssText) {
|
||||
return;
|
||||
}
|
||||
|
||||
(<CSSStyleSheet>style.sheet).insertRule(selector + '{' + cssText + '}', 0);
|
||||
style.textContent = `${selector}{${cssText}}\n${style.textContent}`;
|
||||
}
|
||||
|
||||
export function removeCSSRulesContainingSelector(ruleName: string, style: HTMLStyleElement = getSharedStyleSheet()): void {
|
||||
|
||||
Reference in New Issue
Block a user