fix(formatter_css): preserve placeholder pseudo selectors#23983
Closed
scttcper wants to merge 1 commit into
Closed
fix(formatter_css): preserve placeholder pseudo selectors#23983scttcper wants to merge 1 commit into
scttcper wants to merge 1 commit into
Conversation
css-in-js placeholder selectors like `${Component}:hover &` could get split into a placeholder statement plus a rule, and the sequence printer inserted a space before the pseudo selector.
Print that zero-gap placeholder/rule pair together so the pseudo stays attached, with fixture coverage for pseudo-class and pseudo-element selectors.
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Member
|
After investigation, I realised that this was a problem on the parser’s side, so I've made the fix in #23974. In any case, thank you for your time~! |
camc314
pushed a commit
that referenced
this pull request
Jul 3, 2026
Fixes #23969, closes #23983. Notably `oxc-css-parser@0.0.3` contains: - partial `postcss-simple-vars` support - fix glued css-in-js placeholder (`${C}:hover &`) As `oxc_allocator` has also been added as a dependency in `oxc-css-parser`, this has caused a conflict with the latest local (workspace) instance, so a `patch.crates-io` section has also been added. Apparently, this is a technique also used in [Tokio](https://github.com/tokio-rs/tokio/blob/master/Cargo.toml#L18-L23).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For css-in-js
${Component}:hover &and${Component}:aftershould keep the pseudo attached instead of becoming a descendant selector.this diff shows the before/after this change. Used codex to generate this pr since i'm not a rust person, but we have a surprising number of these in our Sentry frontend.