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

Method _scopeCssText

packages/compiler/src/shadow_css.ts:416–426  ·  view source on GitHub ↗
(cssText: string, scopeSelector: string, hostSelector: string)

Source from the content-addressed store, hash-verified

414 * scopeName .foo { ... }
415 */
416 private _scopeCssText(cssText: string, scopeSelector: string, hostSelector: string): string {
417 // replace :host and :host-context with -shadowcsshost and -shadowcsshostcontext respectively
418 cssText = this._insertPolyfillHostInCssText(cssText);
419 cssText = this._convertColonHost(cssText);
420 cssText = this._convertColonHostContext(cssText);
421 if (scopeSelector) {
422 cssText = this._scopeKeyframesRelatedCss(cssText, scopeSelector);
423 cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);
424 }
425 return cssText.trim();
426 }
427
428 /*
429 * convert a rule like :host(.foo) > .bar { }

Callers 1

shimCssTextMethod · 0.95

Calls 5

_convertColonHostMethod · 0.95
_scopeSelectorsMethod · 0.95

Tested by

no test coverage detected