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

property stacking #17

Open
tomhodgins opened this issue Dec 16, 2016 · 0 comments
Open

property stacking #17

tomhodgins opened this issue Dec 16, 2016 · 0 comments

Comments

@tomhodgins
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant