How to use ::v-slotted in scss

432 views Asked by At

if I write following code everything works fine:

::v-slotted(.title) {
  margin-top: 0;
}
::v-slotted(.title_icon) {
    position: relative;
    left: 5px;
    top: 20px;
  }
}

But I want to use scss syntax.
If I write the following it throws an error:

::v-slotted(.title) {
  margin-top: 0;

  &_icon {
    position: relative;
    left: 5px;
    top: 20px;
  }
}

If I write it like this it doesn't throw an error but it does nothing:

::v-slotted(.title) {
  margin-top: 0;

  ::v-slotted(&_icon) {
    position: relative;
    left: 5px;
    top: 20px;
  }
}

What is the correct syntax?

0

There are 0 answers