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

Method _stripScopingSelectors

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

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

Callers 1

_scopeSelectorsMethod · 0.95

Calls 2

processRulesFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected