Skip to content
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

css中 :global() 出错 #4533

Closed
libbGit opened this issue Sep 7, 2021 · 1 comment
Closed

css中 :global() 出错 #4533

libbGit opened this issue Sep 7, 2021 · 1 comment

Comments

@libbGit
Copy link

libbGit commented Sep 7, 2021

Version

3.2.9

Reproduction link

new-issue.vuejs.org/

Steps to reproduce

<style lang="scss" scoped>
:global(.slide-menu-popover) {
  background-color:red;
  .el-menu {
    font-size:15px;
  }
}
</style>

What is expected?

<style type="text/css">
.slide-menu-popover{
    background-color:red;
}
.slide-menu-popover .el-menu{
    font-size:15px;
}
</style>

What is actually happening?

<style type="text/css">
.slide-menu-popover{
    background-color:red;
}
.slide-menu-popover{
    //全部放到  slide-menu-popover里面了
    font-size:15px;
}
</style>
@posva
Copy link
Member

posva commented Sep 7, 2021

it's :global(.slide-menu-popover .el-menu). Check https://github.com/vuejs/vue-next/blob/master/packages/compiler-sfc/__tests__/compileStyle.spec.ts#L117.

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 🙂

@posva posva closed this as completed Sep 7, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants