dev.e.loper
dev.e.loper

Reputation: 36054

Visual Studio find usages of a CSS class

Is there a way in Visual Studio to find usages of a CSS class? Right now I have to do search the entire project to find all usages. Sometimes its hard if the class is named as something generic like "title". I will get all of these search results that have nothing to do with usage of that class.

Upvotes: 9

Views: 1821

Answers (2)

R. Martinho Fernandes
R. Martinho Fernandes

Reputation: 234564

I don't know of any built-in way of doing this in Visual Studio, but some regex magic might do the trick. Try searching for this:

class="[^"]*<title>

Upvotes: 6

cofiem
cofiem

Reputation: 1414

By usages of a CSS class, do you mean:

... class="title" ...

If so, then you could use the regex search in VS to find these:

class=".*title.*"

Edit: See @Martinho Fernandes response for a working regex.

Upvotes: 0

Related Questions