Skip to content

Multiple CSS Animations are not prefixed during build #53038

@laurenzfiala

Description

@laurenzfiala

Command

build, serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

unknown

Description

I use Angular 16.2 and wanted to add multiple CSS animations to one of my CSS rules.
It seems only the first animation name is prefixed properly, the following ones are not. This only applies to the production build: ng build or ng s -c production. Normal ng serve works fine.

ng s:
image

All animations are applied correctly.

ng s -c production (also ng build):
image

Only the first animation is applied correctly.

I also ran ng update to Angular 17 on the reproduction repo and the issue was still reproducible.

Minimal Reproduction

https://github.com/laurenzfiala/ng16-animations-repro

You can check the commits, I added only a few lines of CSS for a working reproduction.

Exception or Error

No response

Your Environment

Angular CLI: 16.2.10
Node: 18.18.2
Package Manager: npm 10.2.3
OS: win32 x64

Angular: 16.2.12
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1602.10
@angular-devkit/build-angular   16.2.10
@angular-devkit/core            16.2.10
@angular-devkit/schematics      16.2.10
@angular/cli                    16.2.10
@schematics/angular             16.2.10
rxjs                            7.8.1
typescript                      5.1.6
zone.js                         0.13.3

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilerIssues related to `ngc`, Angular's template compiler

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions