Skip to content

fix: invalid css (SD-2930)#3121

Merged
caio-pizzol merged 1 commit intostablefrom
caio/sd-2930-fix-css-stable
May 4, 2026
Merged

fix: invalid css (SD-2930)#3121
caio-pizzol merged 1 commit intostablefrom
caio/sd-2930-fix-css-stable

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Backport of #3115 to stable. The published style.css contains spec-invalid :where(*:not(svg):not(svg *)::before) selectors. Pseudo-elements aren't valid inside :where(), so when consumer bundlers run the CSS through Lightning CSS, the minifier strips them and emits empty :where() blocks that fail sass-loader.

Moves ::before/::after outside :where() to produce valid, minifiable CSS. One-line behavioral note: the original selector silently never matched anything in any browser (spec-invalid), so the isolation reset now actually applies to pseudo-elements for the first time. That's the original intent.

Verified: lightningcss-cli on the source before the fix → two empty :where() selectors; after the fix → valid :where(...)::before / ::after output.

Co-authored-by: Artem Nistuley <artem@superdoc.dev>
@caio-pizzol caio-pizzol requested a review from a team as a code owner May 4, 2026 18:55
@linear
Copy link
Copy Markdown

linear Bot commented May 4, 2026

@caio-pizzol caio-pizzol merged commit aa7eb22 into stable May 4, 2026
21 of 22 checks passed
@caio-pizzol caio-pizzol deleted the caio/sd-2930-fix-css-stable branch May 4, 2026 18:56
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in superdoc-cli v0.8.1

The release is available on GitHub release

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in superdoc-sdk v1.8.1

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.3.1

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 4, 2026

🎉 This PR is included in superdoc v1.31.1

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 5, 2026

🎉 This PR is included in vscode-ext v2.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants