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

vue 3.4.21 :where() style result is not as expected #10511

Closed
Jerd0 opened this issue Mar 13, 2024 · 3 comments · Fixed by #10522
Closed

vue 3.4.21 :where() style result is not as expected #10511

Jerd0 opened this issue Mar 13, 2024 · 3 comments · Fixed by #10522
Labels

Comments

@Jerd0
Copy link

Jerd0 commented Mar 13, 2024

Vue version

3.4.21

Link to minimal reproduction

https://play.vuejs.org/#eNp9ktFLwzAQxv+VcE8Koz7oU50DlT3og4r6GJAuPbtsaRKSSzcZ+9+9tGyWISuFXL7vd8d3pTu4977oEkIJ06iC9iQiUvIzaadXg8AlXwhbbyrCbNS6E8pUMd5J4FoCi3wOb27kox8wauJrpB+DIirnsWalyGN20i4qtW6CS7YuRcD6Vtp9xrNdbpYY8KJcug7D5Sm8MAnH9FelSHd4ijUB0Q4cr5QzzGACxDnst26KVXSWt+cmISQo13ptMLx60s5GCWUeJ/iRUBnjNs+9RiHh5KCrJar1P/oqbrMm4S1gxNChhKNHVWiQBnv+8YJbro9m6+pkmD5jvmN0JuWMA/bAq3LsEdenfWq9C6Rt8xnnW0IbD0vloJnc97wE/gUez6z+F/e6uOn7+HvC/hedHsU4

Steps to reproduce

visit link
https://play.vuejs.org/#eNp9ktFLwzAQxv+VcE8Koz7oU50DlT3og4r6GJAuPbtsaRKSSzcZ+9+9tGyWISuFXL7vd8d3pTu4977oEkIJ06iC9iQiUvIzaadXg8AlXwhbbyrCbNS6E8pUMd5J4FoCi3wOb27kox8wauJrpB+DIirnsWalyGN20i4qtW6CS7YuRcD6Vtp9xrNdbpYY8KJcug7D5Sm8MAnH9FelSHd4ijUB0Q4cr5QzzGACxDnst26KVXSWt+cmISQo13ptMLx60s5GCWUeJ/iRUBnjNs+9RiHh5KCrJar1P/oqbrMm4S1gxNChhKNHVWiQBnv+8YJbro9m6+pkmD5jvmN0JuWMA/bAq3LsEdenfWq9C6Rt8xnnW0IbD0vloJnc97wE/gUez6z+F/e6uOn7+HvC/hedHsU4

  1. hover div block,
  2. the hover effect is not applied because between 3.3.4 and 3.4.21 -> vue changed the approach, and because of scoped the specificity of this style is downgraded instead of upgraded.

What is expected?

hover works properly

What is actually happening?

hover is not working

System Info

System:
    OS: macOS 14.3.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 50.53 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v20.9.0/bin/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    pnpm: 7.26.3 - ~/.nvm/versions/node/v20.9.0/bin/pnpm
  Browsers:
    Chrome: 122.0.6261.112
    Safari: 17.3.1

Any additional comments?

No response

@Jerd0
Copy link
Author

Jerd0 commented Mar 13, 2024

#9992 mb this link will be helpful

also, looks like this issue has been added in version 3.3.9

@edison1105 edison1105 added 🐞 bug Something isn't working scope: compiler 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. regression and removed 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels Mar 14, 2024
@edison1105
Copy link
Member

a workaround

@Jerd0
Copy link
Author

Jerd0 commented Mar 14, 2024

a workaround

also in pcss, we can past & after :where(), like

.div {
  background: red
  :where(:hover)& {
    background: blue
  }
}

but, in my opinion, the vue-compiler has a bug right now

haoqunjiang pushed a commit that referenced this issue Mar 25, 2024
Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>

Closes #10511
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2024
lynxlangya pushed a commit to lynxlangya/core that referenced this issue May 30, 2024
)

Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>

Closes vuejs#10511
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants