MCPcopy Index your code
hub / github.com/angular/angular / _convertColonHostContext

Method _convertColonHostContext

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

Source from the content-addressed store, hash-verified

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