diff --git a/packages/core/css/system-classes.ts b/packages/core/css/system-classes.ts index 3c1edadcb9..a40e6a6607 100644 --- a/packages/core/css/system-classes.ts +++ b/packages/core/css/system-classes.ts @@ -6,6 +6,7 @@ export namespace CSSUtils { export const CLASS_PREFIX = 'ns-'; export const MODAL_ROOT_VIEW_CSS_CLASS = `${CLASS_PREFIX}${MODAL}`; export const ROOT_VIEW_CSS_CLASS = `${CLASS_PREFIX}${ROOT}`; + export const IgnoredCssDynamicAttributeTracking = new Set(); export function getSystemCssClasses(): string[] { return cssClasses; diff --git a/packages/core/ui/styling/css-selector.ts b/packages/core/ui/styling/css-selector.ts index bccd3971dc..580b8b0df6 100644 --- a/packages/core/ui/styling/css-selector.ts +++ b/packages/core/ui/styling/css-selector.ts @@ -4,6 +4,7 @@ import { isNullOrUndefined } from '../../utils/types'; import * as ReworkCSS from '../../css'; import { Combinator as ICombinator, SimpleSelectorSequence as ISimpleSelectorSequence, Selector as ISelector, SimpleSelector as ISimpleSelector, parseSelector } from '../../css/parser'; +import { CSSUtils } from '../../css/system-classes'; /** * An interface describing the shape of a type on which the selectors may apply. @@ -675,6 +676,9 @@ export class SelectorsMatch implements ChangeAccumulator { public selectors: SelectorCore[]; public addAttribute(node: T, attribute: string): void { + if (CSSUtils.IgnoredCssDynamicAttributeTracking.has(attribute)) { + return; + } const deps: Changes = this.properties(node); if (!deps.attributes) { deps.attributes = new Set();