-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
fix(compiler-sfc): replace trailing universal selector with :where([id]) in scoped styles #13404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes update the logic for handling trailing universal selectors ( Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant SFC_Compiler
participant CSS_Parser
Developer->>SFC_Compiler: Write CSS with universal selectors in .vue file
SFC_Compiler->>CSS_Parser: Parse CSS selectors
CSS_Parser-->>SFC_Compiler: Return selector AST
SFC_Compiler->>SFC_Compiler: Detect trailing universal selector
SFC_Compiler->>SFC_Compiler: Replace with :where([data-v-xxx])
SFC_Compiler-->>Developer: Output compiled CSS with :where([data-v-xxx])
Assessment against linked issues
Possibly related PRs
Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (7)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
/ecosystem-ci run |
This could lead to browser compatibility issues. https://vuejs.org/about/faq.html#what-browsers-does-vue-support |
📝 Ran ecosystem CI: Open
|
close #13401
re-fix #12906
#12918 replaced
*
with[id]
, which indirectly increased the rule's specificity.row[data-v-e17ea971] > * {}
changed to.row[data-v-e17ea971] > [data-v-e17ea971] {}
,leading to the issue in #13401.
This PR changes
*
to:where([id])
to maintain the same specificity.Summary by CodeRabbit
:where()
pseudo-class for more accurate and consistent styling in compiled CSS. This affects selectors such as.foo *
and*:active
.