MCPcopy
hub / github.com/angular/angular / _scopeKeyframesRelatedCss

Method _scopeKeyframesRelatedCss

packages/compiler/src/shadow_css.ts:243–251  ·  view source on GitHub ↗

* Process styles to add scope to keyframes. * * Modify both the names of the keyframes defined in the component styles and also the css * animation rules using them. * * Animation rules using keyframes defined elsewhere are not modified to allow for globally * defined keyframes.

(cssText: string, scopeSelector: string)

Source from the content-addressed store, hash-verified

241 * @returns the scoped css text.
242 */
243 private _scopeKeyframesRelatedCss(cssText: string, scopeSelector: string): string {
244 const unscopedKeyframesSet = new Set<string>();
245 const scopedKeyframesCssText = processRules(cssText, (rule) =>
246 this._scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet),
247 );
248 return processRules(scopedKeyframesCssText, (rule) =>
249 this._scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet),
250 );
251 }
252
253 /**
254 * Scopes local keyframes names, returning the updated css rule and it also

Callers 1

_scopeCssTextMethod · 0.95

Calls 3

_scopeAnimationRuleMethod · 0.95
processRulesFunction · 0.85

Tested by

no test coverage detected