Alex Togo
Alex Togo

Reputation: 1

vscode css code definitions

I used a CSS class in HTML, but this class is not defined yet

Image Link "class in HTML"

Then I tried to define this class in CSS. However, vscode cannot suggest me an already existing class.

Image Link "in CSS"

I'm new in vs code - please suggest me extension for this (I tried a lot of extensions but never found a working)

Update:

In an Atom it works, please check: in HTML: in HTML And in CSS in CSS

Upvotes: 0

Views: 197

Answers (2)

Mark
Mark

Reputation: 183094

Assuming you declare the class name first in your css/scss file, then in an html file you can get intellisense for those class names with the extension class completion in html.

Upvotes: 0

Mike Lischke
Mike Lischke

Reputation: 53582

You are confusing things here. CSS class completion works the other way around. You define the class in your CSS and then vscode will offer that as candidate when you write your HTML tag and assign it a class.

Upvotes: 1

Related Questions