css – Style v-html Vue 3

0
117
html - Animation after toggling doesn't apply the second style


For some reason this is working in Vue 3 which says is deprecated in every other SO answer:

.description >>> p {
  color: red;
  margin-bottom: 1rem;
}

But I’ve tried all the permutations of ::v-deep and can’t seem to make it work:

::v-deep .description {
  p {
    color: red;
    margin-bottom: 1rem;
  }
}

.description {
  ::v-deep p {
    margin-bottom: 1rem;
  }
}

How would I do this with “vanilla” Vue 3?

<div class="description text-sm">
  <div v-html="item.description"></div>
</div>



Source link

Leave a reply

Please enter your comment!
Please enter your name here