csso icon indicating copy to clipboard operation
csso copied to clipboard

CSS error breaks optimization

Open PavelFil opened this issue 1 year ago • 2 comments

Hello. This code can't be minified:

.marquee p:nth-child {
    color:red;
}

The error text:

/usr/lib/node_modules/csso-cli/node_modules/csso/cjs/restructure/prepare/specificity.cjs:80
                        const arg = node.children.first;

Online service https://css.github.io/csso/csso.html shows error too.

PavelFil avatar Mar 03 '24 07:03 PavelFil

How do you expect to minify this invalid CSS? Drop it entirely?

dryabov avatar Mar 03 '24 07:03 dryabov

I think yes, drop it entirely is a best choose. This code can't be used by browsers.

PavelFil avatar Mar 03 '24 07:03 PavelFil