list of classes in html / css

Hi, Is there any way to get a list of all the classes (and IDs) in VS code? I have found an extension CSS selector generator [CSG], but it seems does nothing. I have one main css file(marking colours, etc, ), and sepearate ones for coding the actual pages. I would like to cross check them, for any duplications... Any idea? I am looking for some kind of view of all the classes & IDs. thank you!
3 Replies
clevermissfox
clevermissfox5w ago
Javascript- Console.log anything with a class or id attribute?
snxxwyy
snxxwyy5w ago
You can just search the id and class in vscode too and it’ll show every instance of the phrase you put and where in what files they are
Lamer of Sweden
Right click on first css file and choose "Select for compare" and then right click on second css file and choose "Compare with selected" and you'll get a view to see the difference like when having a conflict while trying to merge a branch. Else go for a regex in search. 1. Open New Search Editor (Ctrl + Shift + P and search for New Search Editor)
2. Add following to Search field
[\.#](?!\d)[\w-]+(?:\s*,\s*\.(?!\d)[\w-]+)*
[\.#](?!\d)[\w-]+(?:\s*,\s*\.(?!\d)[\w-]+)*
3. Activate regex (Alt + R) or click the third button to the right side of the search field 4. Click [...] to Toggle Search Details 5. Add following to inlude files like css, scss, sass
**/*.{css,scss,sass}
**/*.{css,scss,sass}
This should get you all the classes (.classname) and IDs (#idname)
Want results from more Discord servers?
Add your server