Closed cmbartschat closed 1 year ago
Vite uses esbuild to minify CSS and esbuild transforms
span.foo::before {
content: '';
}
into
span.foo:before{content:""}
But I think changing ::before
to :before
is spec-compliant. This is written on the spec.
For compatibility with existing style sheets written against CSS Level 2 [CSS2], user agents must also accept the previous one-colon notation (:before, :after, :first-letter, :first-line) for the ::before, ::after, ::first-letter, and ::first-line pseudo-elements. https://w3c.github.io/csswg-drafts/css-pseudo/#css2-compat
I guess qwik's transformation doesn't take pseudo elements with one-colon notation like :before
into account.
Describe the bug
Becomes:
By dropping the extra
:
from::before
, this is against the spec depended on by a plugin used by the Qwik build, see issue: https://github.com/BuilderIO/qwik/issues/2189Reproduction
https://stackblitz.com/edit/vitejs-vite-hwufm4?file=style.css
Steps to reproduce
Run
npm run build
, then inspect the dist/assets/index-xxx.css to see the output.System Info
Used Package Manager
npm
Logs
No response
Validations