You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mergeLonghand currently merges properties even when one of them is invalid.
For example, code like:
a {
margin-top:10px;
margin-left:20px;
margin-right:30px;
margin-bottom: invalid;
}
is minified to:
a{margin:10px 30px invalid 20px}
This changes the behavior of the code, as in the longhand form, only the invalid bottom margin is ignored by the browser. When the margins are combined, the combined property is now invalid, so the browser ignores all the margins.
Expected behaviour
Valid and invalid longhand properties should not be merged.
Describe the bug
mergeLonghand
currently merges properties even when one of them is invalid.For example, code like:
is minified to:
This changes the behavior of the code, as in the longhand form, only the invalid bottom margin is ignored by the browser. When the margins are combined, the combined property is now invalid, so the browser ignores all the margins.
Expected behaviour
Valid and invalid longhand properties should not be merged.
Steps to reproduce
Copy the example above into https://cssnano.co/playground/
Version
5.1.14
Preset
default
Environment
Package details
Additional context
No response
The text was updated successfully, but these errors were encountered: