Skip to content

property stacking #17

@tomhodgins

Description

@tomhodgins

This one really surprised me - it did it with color, background, lots of things!

html {
  background: red;
}
html {
  background: orange;
}
html {
  background: yellow;
}
html {
  background: green;
}
html {
  background: blue;
}
html {
  background: indigo;
}
html {
  background: violet;
}

correct minification

html{background:violet}
  • redundant properties can be eliminated

CSSnano output

html{background:red;background:orange;background:#ff0;background:green;background:blue;background:indigo;background:violet}
  • keeps previously declared background properties even though it can predict they won't apply

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions