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

Method _convertColonHostContext

packages/compiler/src/shadow_css.ts:505–514  ·  view source on GitHub ↗
(cssText: string)

Source from the content-addressed store, hash-verified

503 * .foo<scopeName> .bar { ... }
504 */
505 private _convertColonHostContext(cssText: string): string {
506 // Splits up the selectors on their top-level commas, processes the :host-context in them
507 // individually and stitches them back together. This ensures that individual selectors don't
508 // affect each other.
509 const results: string[] = [];
510 for (const part of this._splitOnTopLevelCommas(cssText, false)) {
511 results.push(this._convertColonHostContextInSelectorPart(part));
512 }
513 return results.join(',');
514 }
515
516 private _convertColonHostContextInSelectorPart(cssText: string): string {
517 return cssText.replace(_cssColonHostContextReGlobal, (selectorText, pseudoPrefix) => {

Callers 1

_scopeCssTextMethod · 0.95

Calls 4

joinMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected