From 32567ef36165c688f34b39d515790d4ce0836b4d Mon Sep 17 00:00:00 2001 From: Eduardo Speroni Date: Sat, 4 Jun 2022 14:24:13 -0300 Subject: [PATCH] feat(core): allow removal of specific CSS variables (#9896) --- packages/core/ui/styling/style/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/core/ui/styling/style/index.ts b/packages/core/ui/styling/style/index.ts index 48134afec..41cf5dd7a 100644 --- a/packages/core/ui/styling/style/index.ts +++ b/packages/core/ui/styling/style/index.ts @@ -56,6 +56,14 @@ export class Style extends Observable implements StyleDefinition { this.unscopedCssVariables.set(varName, value); } + public removeScopedCssVariable(varName: string): void { + this.scopedCssVariables.delete(varName); + } + + public removeUnscopedCssVariable(varName: string): void { + this.unscopedCssVariables.delete(varName); + } + public getCssVariable(varName: string): string | null { const view = this.view; if (!view) {