Skip to content

Invalid CSS is produced when optimization=true #21868

Closed
@ychaikin

Description

@ychaikin

Which @angular/* package(s) are the source of the bug?

cli

Is this a regression?

No

Description

When the build is configured in angular.json with "optimization": true, in some cases this optimization cases invalid CSS to be produced.

For example, for CSS in a component like this:

margin: inherit;
margin-top: 5px;
margin-left: 5px;

If optimized, produces this CSS:

margin: 5px inherit inherit 5px;

Using inherit in the shorthand margin is not valid.

Please provide a link to a minimal reproduction of the bug

https://github.com/ychaikin/optimized

Please provide the exception or error you saw

See description

Please provide the environment you discovered this bug in

Angular CLI 12.2.8

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions