angular/packages/compiler/src
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
..
compiler_util refactor(compiler): remove ViewEngine identifiers (#44676) 2022-02-02 00:04:13 +00: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 refactor(compiler): delete View Engine components of @angular/compiler (#44368) 2021-12-06 13:12:36 -05:00
ml_parser refactor: replace deprecated String.prototype.substr() (#45397) 2022-03-24 11:48:09 -07:00
output refactor(compiler): add @suppress {msgDescriptions} if no description is present on an i18n message (#44787) 2022-02-02 15:33:44 -08:00
render3 refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
schema refactor(common): drop unnecessary srcset sanitization (#47302) 2022-09-09 14:27:16 -07:00
template_parser refactor: replace deprecated String.prototype.substr() (#45397) 2022-03-24 11:48:09 -07:00
assertions.ts refactor(compiler): remove unused assertion function (#44411) 2022-01-04 15:54:09 -08:00
chars.ts refactor(compiler): share isQuote() via chars.ts (#43129) 2021-08-16 13:07:23 -07:00
compiler.ts feat(bazel): speed up dev-turnaround by bundling types only when packaging (#45405) 2022-04-21 11:09:39 -07:00
compiler_facade_interface.ts refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
config.ts fix(core): update isDevMode to rely on ngDevMode (#47475) 2022-09-23 13:58:45 -07:00
constant_pool.ts docs: fix spelling (#46713) 2022-07-08 20:54:52 +00:00
core.ts refactor(compiler): remove unused type declarations (#44411) 2022-01-04 15:54:09 -08:00
injectable_compiler_2.ts fix(compiler): ensure that partially compiled queries can handle forward references (#44113) 2021-11-10 18:25:16 +00:00
jit_compiler_facade.ts refactor(compiler): add support for host directives (#46868) 2022-08-22 16:00:35 -07:00
parse_util.ts refactor: replace deprecated String.prototype.substr() (#45397) 2022-03-24 11:48:09 -07:00
resource_loader.ts refactor(compiler): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:14 -07:00
selector.ts refactor: replace deprecated String.prototype.substr() (#45397) 2022-03-24 11:48:09 -07:00
shadow_css.ts fix(compiler): scope css keyframes in emulated view encapsulation (#42608) 2022-09-29 15:49:51 -07:00
style_url_resolver.ts refactor(compiler): make template preparser null-safe (#44411) 2022-01-04 15:54:10 -08:00
util.ts fix(localize): ensure transitively loaded compiler code is tree-shakable (#45405) 2022-04-21 11:09:39 -07:00
version.ts docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00