angular/packages/compiler/test
dario-piotrowicz 051f75648d fix(compiler): scope css keyframes in emulated view encapsulation (#42608)
Ensure that keyframes rules, defined within components with emulated
view encapsulation, are scoped to avoid collisions with keyframes in
other components.

This is achieved by renaming these keyframes to add a prefix that makes
them unique across the application.

In order to enable the handling of keyframes names defined as strings
the previous strategy of replacing quoted css content with `%QUOTED%`
(introduced in commit 7f689a2) has been removed and in its place now
only specific characters inside quotes are being replaced with
placeholder text (those are `;`, `:` and `,`, more can be added in
the future if the need arises).

Closes #33885

BREAKING CHANGE:

Keyframes names are now prefixed with the component's "scope name".
For example, the following keyframes rule in a component definition,
whose "scope name" is host-my-cmp:

   @keyframes foo { ... }

will become:

   @keyframes host-my-cmp_foo { ... }

Any TypeScript/JavaScript code which relied on the names of keyframes rules
will no longer match.

The recommended solutions in this case are to either:
- change the component's view encapsulation to the `None` or `ShadowDom`
- define keyframes rules in global stylesheets (e.g styles.css)
- define keyframes rules programmatically in code.

PR Close #42608
2022-09-29 15:49:51 -07:00
..
expression_parser fix(compiler): infinite loop in parser assignment expression with invalid left-hand expression (#47151) 2022-08-17 07:33:32 +00:00
i18n test: remove view-engine-only tests (#43884) 2021-11-23 21:10:06 +00:00
ml_parser build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
output test: update source-map tests to account for source-map breaking change (#46888) 2022-07-19 09:40:54 -07:00
render3 refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
schema refactor: replace deprecated String.prototype.substr() (#45397) 2022-03-24 11:48:09 -07:00
selector build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
shadow_css fix(compiler): scope css keyframes in emulated view encapsulation (#42608) 2022-09-29 15:49:51 -07:00
BUILD.bazel build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
compiler_facade_interface_spec.ts refactor(core): change component emit to 'dependencies' (#45672) 2022-04-20 05:45:56 -07:00
integration_spec.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00
style_url_resolver_spec.ts refactor(compiler): make template preparser null-safe (#44411) 2022-01-04 15:54:10 -08:00
util_spec.ts perf(compiler): use raw bytes to represent utf-8 encoded strings (#39694) 2020-11-17 10:09:28 -08:00