angular/packages/compiler/test
Kristiyan Kostadinov 98f820737b fix(compiler): handle :host-context with comma-separated child selector (#59276)
Both `:host` and `:host-context` work by looking for a specific character sequence that is terminated by `,` or `{` and replacing selectors inside of it with scoped versions. This is implemented as a regex which isn't aware of things like nested selectors. Normally this is fine for `:host`, because each `:host` produces one scoped selector which doesn't affect any child selectors, however it breaks down with `:host-context` which replaces each instance with two selectors. For example, if we have a selector in the form of `:host-context(.foo) a:not(.a, .b)`, the compiler ends up determining that `.a,` is the end selector and produces `.foo[a-host] a[contenta]:not(.a, .foo [a-host] a[contenta]:not(.a, .b) {}`.

These changes resolve the issue by splitting the CSS alogn top-level commas, processing the `:host-context` in them individually, and stiching the CSS back together.

PR Close #59276
2025-01-21 09:11:16 -08:00
..
expression_parser refactor(compiler): fix typo in method name (#59479) 2025-01-13 10:57:51 -05:00
i18n test(compiler): update failing tests (#58217) 2024-10-16 09:47:10 +00:00
ml_parser refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
output refactor(compiler): remove unused field from output AST (#58444) 2024-11-01 14:32:57 +00:00
render3 refactor(compiler): fix typo in method name (#59479) 2025-01-13 10:57:51 -05:00
schema refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
selector refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
shadow_css fix(compiler): handle :host-context with comma-separated child selector (#59276) 2025-01-21 09:11:16 -08:00
BUILD.bazel build: replace base64-js package with Node.js Buffer usage (#53464) 2023-12-11 14:04:06 -08:00
compiler_facade_interface_spec.ts docs: set syntax highlighting of code examples MD code blocks (#59026) 2024-12-04 17:30:28 +01:00
integration_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
security_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
style_url_resolver_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
util_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00