language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Class completion for CSS

Open icebr9 opened this issue 5 years ago • 6 comments

Describe the bug Not quite sure if its within the scope of the Svelte plugin but:

If you have:

 <div class="form-field"></div>

And try to do class selector within the style tag like:

<style>
.form-field {
color: red;
}
</style>

Just starting with "." in the <style> gives you gibberish suggestions for autocompletion.

Expected behavior I've tried the same within normal .html file and behavour there is as such: "form" selector works normally, but for words starting with "." it is completly disabled, same with #.

It would be nice to have "class names intellisense" for svelte components but disabling bad autocompletion is ok as well..

Screenshots If applicable, add screenshots to help explain your problem. image

System (please complete the following information):

  • OS: Windows
  • IDE: VSCode
  • Plugin: Svelte Beta

icebr9 avatar May 12 '20 08:05 icebr9

The gibberish part was partly addressed in #82 and will be further tackled by #57. The autocompletion part is a new feature that is not implemented yet.

dummdidumm avatar May 12 '20 08:05 dummdidumm

This is really useful to have it working out of the box. Right now I have to switch back and forth from HTML to svelte extensions just to get the autocomplete working

gevera avatar Sep 30 '20 11:09 gevera

I think you have another extension that provides CSS class completions for html. For example, vscode-html-css or IntelliSense for CSS class names in HTML

jasonlyu123 avatar Sep 30 '20 12:09 jasonlyu123

Any progress on this?

yousufiqbal avatar Oct 03 '22 17:10 yousufiqbal

Any progress on this?

ayuancool avatar Feb 10 '24 18:02 ayuancool