skip to Main Content

I’m using sass for improving my nested css class like:

.parent {
  &__child {...}
}

but when I want to navigate from &__child to see where it is used, I can’t. The other way around, from HTML to css works. How can I achieve it both ways?

Further info:

  • IDE: Intellij
  • framework: Vue

2

Answers


  1. As far as I know there is no way to do this, because Intellij only supports fully written classes to navigate to. Therefore I would recommend to nest least as possible and if you nest your classes, write down the full class name instead of using &.

    Login or Signup to reply.
  2. This is not currently supported. The issue is tracked at https://youtrack.jetbrains.com/issue/WEB-41364/Allow-searching-for-usages-of-SASS-nested-selectors-created-with-ampersand, please vote for it to get notified when it’s fixed

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search