Sublime Forum

How to show the line numbers of a CSS class

#1

I once had this: I was holding my mouse over the name of a CSS class in a HTML document and suddenly a popup appears showing in which CSS file at which line number this class is defined.
After that I never saw this again. How to make it popup again?

0 Likes

#2

You can right-click and the top option on the context menu is (for me) Goto Definition. This is the functionality you are looking for.

0 Likes

#3

Thanks, it works. Though not always. On most of the classes the definition is not found.

0 Likes

#4

can you share some example code where it doesn’t detect the definitions please?

0 Likes

#5

It’s code from the bootstrap framework. But I just realized something: It only works if the css file is opened. I though it’s more intelligent thant that… So it might be not bug after all.

My problem is, that I don’t know exactly in which of the many css files in the bootstrap framework the class is defined. So I need to open all css files.

0 Likes

#6

you should be able to add the bootstrap folder to your project, and then it will work even if the relevant CSS file is not open in a tab

0 Likes

#7

Indeed. Thanks!

0 Likes