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 doesn't work correctly with dark classes in Tailwind 3.3 #8915

Closed
doutatsu opened this issue Aug 4, 2023 · 4 comments · Fixed by #8929
Closed

Vue doesn't work correctly with dark classes in Tailwind 3.3 #8915

doutatsu opened this issue Aug 4, 2023 · 4 comments · Fixed by #8929
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. has PR A pull request has already been submitted to solve the issue scope: compiler

Comments

@doutatsu
Copy link

doutatsu commented Aug 4, 2023

Vue version

3.2.41

Link to minimal reproduction

https://github.com/remiconnesson/tailwind-vue-deep-apply-dark-bug

Steps to reproduce

Reproduction already exists in tailwindlabs/tailwindcss#11024

What is expected?

Vue correctly converts deep selectors inside scoped CSS

What is actually happening?

For example it gets converted like this

.dark .wrapper-without-is[data-v-472cff63] .child-text {
  color: blue;
}

instead of this:

:is(.dark .wrapper[data-v-472cff63] .child-text) {
  color: blue;
}

System Info

No response

Any additional comments?

I am reposting this from the issue opened in TailwindCSS - tailwindlabs/tailwindcss#11024. Their team has said it's a Vue issue and they were planning on opening a bug report, but they never did. This issue has persisted for awhile and makes it impossible to upgrade, hence why I am opening it now

@Shyam-Chen
Copy link
Contributor

Shyam-Chen commented Aug 5, 2023

I can't reproduce the issue, I am using UnoCSS.

image image

@doutatsu
Copy link
Author

doutatsu commented Aug 5, 2023

@Shyam-Chen AFIK UnoCSS doesn't have this issue - only TailwindCSS on it's own (it was mentioned somewhere as I was reading through, will find the source)

@remiconnesson
Copy link

remiconnesson commented Aug 5, 2023

Hey in this reply tailwindlabs/tailwindcss#11024 (comment) there's a link to repro that doesn't use tailwindcss at all.

Link:
https://play.vuejs.org/#eNqtU8FSwjAQ/ZVMTjgD5cCtVmfU4aAHddRjLrVZIZAmmWQDOAz/bhIoLYo4znDb7tv39u1ru6Y3xmQLDzSnBUJtZIlwzRQhBReLVGxLUsnSuStGl7Y0BiyjO/AbXE2F5AOEFYYJBIfFsCPUrbssXtr5b4o/F/5n5eHS49KDpcCp9jgQ7ixb2rqpimEn2/Do8FMCcZU2wEMn2xkhOQcwvazddUHWUafSUtucWOCXTG2iRC5cL4uxkRPkQ/a79NDQD6mdAP6y0IoUw3RFsE/7FMMt6kNMspnTKnxLiRJC07UREuyTQaFVSDffikWslFIvH1IPrYd+06+mUM2P9GduFXuMPltwYBfA6B7D0k4gvJgIj18f00vag7XmXobpE+ALOC199Lgdu/WKB9udueT2vjbaolCTNzdeISjXHBWNxslNmmc0/FB3J05v7Y6yUeKFROnmCyTVKP0=

<template>
  <div>
    <div class="wrapper">
      <div class="child-text">test</div>
    </div>
    <div class="dark">
      <div class="wrapper">
        <div class="child-text">test</div>
      </div>
      <div class="wrapper-without-is">
        <div class="child-text">test</div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.wrapper :deep(.child-text) {
  color: red;
}

:is(.dark .wrapper :deep(.child-text)) {
  color: blue;
}

.dark .wrapper-without-is :deep(.child-text) {
  color: blue;
}
</style>

results in

image

@edison1105 edison1105 added the has PR A pull request has already been submitted to solve the issue label Aug 8, 2023
@sodatea sodatea added the 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. label Aug 28, 2023
@yyx990803
Copy link
Member

yyx990803 commented Nov 10, 2023

closed via #8929

@github-actions github-actions bot locked and limited conversation to collaborators Nov 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. has PR A pull request has already been submitted to solve the issue scope: compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants