(cssText: string)
| 433 | * .foo<scopeName> > .bar |
| 434 | */ |
| 435 | private _convertColonHost(cssText: string): string { |
| 436 | return cssText.replace(_cssColonHostRe, (_, hostSelectors: string, otherSelectors: string) => { |
| 437 | if (hostSelectors) { |
| 438 | const parts = [...this._splitOnTopLevelCommas(hostSelectors, true)]; |
| 439 | if (parts.length > 1) { |
| 440 | return ':host(' + hostSelectors + ')' + otherSelectors; |
| 441 | } |
| 442 | const trimmedHostSelector = parts[0].trim(); |
| 443 | if (trimmedHostSelector) { |
| 444 | return ( |
| 445 | _polyfillHostNoCombinator + |
| 446 | trimmedHostSelector.replace(_polyfillHost, '') + |
| 447 | otherSelectors |
| 448 | ); |
| 449 | } |
| 450 | } |
| 451 | return _polyfillHostNoCombinator + otherSelectors; |
| 452 | }); |
| 453 | } |
| 454 | |
| 455 | /** |
| 456 | * Generator function that splits a string on top-level commas (commas that are not inside parentheses). |
no test coverage detected