* 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)
| 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 |
no test coverage detected