vue icon indicating copy to clipboard operation
vue copied to clipboard

::v-deep is not working

Open handhikadj opened this issue 1 year ago • 4 comments

Version

2.7.8

Reproduction link

codesandbox.io

Steps to reproduce

look at the .Vue components and the result tab

What is expected?

::v-deep is working

What is actually happening?

::v-deep is not working


I got projects and v-deep is working. don't know why it's not working on this one. I don't think I'm doing wrong on the sandbox, am I?

handhikadj avatar Jul 27 '22 20:07 handhikadj

In you demo, in package.json , i have not see any dependencies about sasssass-loader if you want to use like this:

<style lang="scss" scoped>
::v-deep .h3 {
  color: blue !important;
}
</style>

you'll need to install sass-loader

yarn add -D sass-loader sass

or, you can use as this:

<style  scoped>
>>> .h3 {
  color: blue !important;
}
</style>

donaf avatar Jul 28 '22 03:07 donaf

thanks for responding. still not working anyway: https://codesandbox.io/s/distracted-panna-t1xvx6

handhikadj avatar Jul 28 '22 05:07 handhikadj

image image I tried it and found that this is the result, but I don't know why, looking forward to the reply from God...

yixiu025 avatar Jul 28 '22 14:07 yixiu025

use :deep() instead. e.g. :deep(.el-card__body){ width: 200px; }

JC-Guy avatar Aug 08 '22 09:08 JC-Guy

CodeSandbox does not correctly support Vue 2.7. Don't use it for reproducing issues.

::v-deep is working correctly in local Vue CLI or Vite based projects.

yyx990803 avatar Aug 19 '22 03:08 yyx990803