Vscode: [css] propose class names and ids that exist in HTML

Created on 11 Jun 2017  路  6Comments  路  Source: microsoft/vscode

When write my HTML first, I add a class name that I have not yet created in my CSS, for example div class="vscode" /div . When I go to my CSS file and begin typing ".v" there is no autocomplete for ".vscode". but in the webstorm ,there is a hint, it's really great.

there are some extensions to auto-complete class name, but all of them (at least I can't find one)offer the suggestions based on the css files instead of html files .

someone has the same problem.

https://stackoverflow.com/questions/40760014/vs-code-html-css-classes-scoping?rq=1

https://stackoverflow.com/questions/41817375/vscode-autocomplete-in-css-a-class-first-created-in-your-html-tag-extension-fo?rq=1

  • VSCode Version: last version
  • OS Version: last version
css-less-scss feature-request

Most helpful comment

Vote up, this property is really missing and important and it could work vice versa.

All 6 comments

Vote up, this property is really missing and important and it could work vice versa.

Funny thing this, I remember having this feature on an old install of vscode over a year ago. Can't remember if I used an extension and if I did which one it was. I could declare ids and classes in html (and php) files and they would autocomplete in my .scss files. Been searching for this functionality for a while now and it's hard to believe it can't be done.

This extension provides the feature, but I'd definitely prefer if this were supported 'natively' :)

This extension makes the trick: https://marketplace.visualstudio.com/items?itemName=solnurkarim.html-to-css-autocompletion

This feature should be included natively...

This extension makes the trick: https://marketplace.visualstudio.com/items?itemName=solnurkarim.html-to-css-autocompletion

This feature should be included natively...

Thank you so much for that extension!

covered by #47331

Was this page helpful?
0 / 5 - 0 ratings

Related issues

v-pavanp picture v-pavanp  路  3Comments

lukehoban picture lukehoban  路  3Comments

sijad picture sijad  路  3Comments

biij5698 picture biij5698  路  3Comments

shanalikhan picture shanalikhan  路  3Comments