Closed ianjvr-genesys closed 8 years ago
I appreciate the pull request. While it would be nice to have the smaller size by de-duping rules, there are enough cases where you'll use multiple values for the same rule to allow fallback values for rendering engines that don't support certain features that I'm going to nix this :(
example where it is desired to have multiple of the same rule:
.myfancybackground {
/* this should work everywhere */
background: blue;
/* IE <10 won't see this as a valid rule so it will keep using the last value */
background: linear-gradient( 45deg, blue, red );
}
To my understanding inline styles take preference so lets simulate the behavior.
Instead of just adding the styles to the start of the styles tag, parse the existing styles and only add the items thats not already present.