csso icon indicating copy to clipboard operation
csso copied to clipboard

Not deleting duplicate color declarations.

Open lumberman opened this issue 6 years ago • 3 comments

Hello, I believe the library has hard time to delete duplicate color declarations if rgba used.

For example if you try this code: .foo { color: #ff0000; color: rgba(13,13,13,.03); }

CSSO will not remove duplicate colour declarations.

lumberman avatar Feb 28 '18 00:02 lumberman

@lahmatiy any chance to take a look at this issue? Thank you!

lumberman avatar Mar 09 '18 23:03 lumberman

actually, it keeps them on purpose, to avoid breaking the fallback for browsers not supporting rgba

stof avatar Aug 21 '18 13:08 stof

CSSO doesn't merge declarations in this case because of

to avoid breaking the fallback for browsers not supporting rgba

On the one hand, browsers that doesn't support for rgba() is not an issue anymore. On the other hand, that's not a single issue (e.g. values with rem, vw and vh units or selectors with :hover, ::before/::after pseudos are also an issue) and somebody may need to keep fallbacks for old browsers. I planned to add an option to specify which fallbacks is needed to respect. Unfortunately, this feature may take much more time that I have currently.

lahmatiy avatar Dec 06 '19 14:12 lahmatiy