MCPcopy
hub / github.com/angular/angular / _stripScopingSelectors

Method _stripScopingSelectors

packages/compiler/src/shadow_css.ts:634–641  ·  view source on GitHub ↗

* Handle a css text that is within a rule that should not contain scope selectors by simply * removing them! An example of such a rule is `@font-face`. * * `@font-face` rules cannot contain nested selectors. Nor can they be nested under a selector. * Normally this would be a syntax error

(cssText: string)

Source from the content-addressed store, hash-verified

632 * ```
633 */
634 private _stripScopingSelectors(cssText: string): string {
635 return processRules(cssText, (rule) => {
636 const selector = rule.selector
637 .replace(_shadowDeepSelectors, ' ')
638 .replace(_polyfillHostNoCombinatorRe, ' ');
639 return new CssRule(selector, rule.content);
640 });
641 }
642
643 private _safeSelector: SafeSelector | undefined;
644 private _shouldScopeIndicator: boolean | undefined;

Callers 1

_scopeSelectorsMethod · 0.95

Calls 2

processRulesFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected