Visual Code/CSS go to definition for elements classes not working

Viewed 32

I'm using VS code 1.17.0 and have a mix of HTML/CSS/ Jquery code.

However in VS code if I right click on a class and choose goto definition, it does not go to definition of the class. In fact nothing happens, not even an error.

Also why go to definition shows even on an any empty location of HTML page?

1 Answers

VS code does show go to definition of empty space in popup menu. This is per design and is not a bug.

For CSS classes to see a definition you need to use a plugin. There are few plugins which can do this. I personally use "CSS Navigation"

Related