Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid CSS is produced when optimization=true #21868

Closed
ychaikin opened this issue Oct 4, 2021 · 1 comment · Fixed by #21861
Closed

Invalid CSS is produced when optimization=true #21868

ychaikin opened this issue Oct 4, 2021 · 1 comment · Fixed by #21861

Comments

@ychaikin
Copy link

ychaikin commented Oct 4, 2021

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

@ychaikin ychaikin changed the title Incorrectly optimizes CSS to produce invalid CSS Invalid CSS is produced when optimization=true Oct 4, 2021
@JoostK JoostK transferred this issue from angular/angular Oct 4, 2021
@clydin clydin linked a pull request Oct 5, 2021 that will close this issue
1 task
@ngbot ngbot bot modified the milestone: Backlog Oct 6, 2021
filipesilva pushed a commit that referenced this issue Oct 6, 2021
This addresses an issue with `margin` merging.

Closes #21868
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants