MCPcopy Create free account
hub / github.com/angular/angular / _scopeKeyframesRelatedCss

Method _scopeKeyframesRelatedCss

packages/compiler/src/shadow_css.ts:244–252  ·  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

242 * @returns the scoped css text.
243 */
244 private _scopeKeyframesRelatedCss(cssText: string, scopeSelector: string): string {
245 const unscopedKeyframesSet = new Set<string>();
246 const scopedKeyframesCssText = processRules(cssText, (rule) =>
247 this._scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet),
248 );
249 return processRules(scopedKeyframesCssText, (rule) =>
250 this._scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet),
251 );
252 }
253
254 /**
255 * 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