lightningcss
lightningcss copied to clipboard
minifier: remove duplicate selectors
h1,h2,h3,h1,h3{
color:blue
}
div.class,div.class,.class{
color:blue
}
https://parcel-css.vercel.app/#%7B%22minify%22%3Atrue%2C%22nesting%22%3Atrue%2C%22customMedia%22%3Atrue%2C%22cssModules%22%3Afalse%2C%22analyzeDependencies%22%3Afalse%2C%22targets%22%3A%7B%22chrome%22%3A6225920%7D%2C%22source%22%3A%22h1%2Ch2%2Ch3%2Ch1%2Ch3%7B%5Cn%20%20color%3Ablue%5Cn%7D%5Cn%5Cndiv.class%2Cdiv.class%2C.class%7B%5Cn%20%20color%3Ablue%5Cn%7D%22%2C%22unusedSymbols%22%3A%5B%5D%2C%22version%22%3A%22local%22%7D
Seems reasonable. When does this happen in real-world code though?
Seems reasonable. When does this happen in real-world code though?
I'm not quite sure if there might be such a code, my guess is that it might be a clerical error or generated by the preprocessor.
I'd like to take a look at this one.
I won't manage currently to work on this. Free to take!
For anybody still looking for a solution here, I've managed to combine cssnano and postcss-lightningcss to achieve the desired result. Note that this will require postcss.
I'd like to have a try