Text outside the `:global()` is ignored in scoped CSS
Vue version
3.2.38
Link to minimal reproduction
Steps to reproduce
Using scoped style, define something like :global(.parent-class) .component-class
. The generated CSS is missing wherever is outside the :global()
.
What is expected?
The generated CSS selector be .parent-class .component-class[data-v-472cff63]
What is actually happening?
The generated CSS selector is just .parent-class
System Info
No response
Any additional comments?
Not the same, but CSS Modules also have :global()
and it allows to have an extra selector after it.
Just use .parent-class .component-class
——
Please, next time consider using the forum, the Discord server or StackOverflow for questions first. But feel free to come back and open an issue if it turns out to be a bug 🙂
That's not the same thing. If I just use .parent-class .component-class
it defeats the purpose of using scoped CSS all together, possible causing naming collision and applying styles where it shouldn't.