About in the file . CSS you can not auto complete a class that only exites in HTML this is documented here: https://github.com/Microsoft/vscode/issues/28442
I think you must have got confused, because as you can see in GitHub
of the project that Feature has not yet been developed...
Your problem with the "erro
" is that you are not putting any property within the class. In short, you have a class .some-class { vazia }
that has no property within the alerta
.
Example of the same error in the console in the tab Problems
of VS Code
In VS Code, you can disable this type of alert by going to Settings
and setting preferences for CSS files as shown below.
Gets into Settings
, in the search bar look for "empt" find inside Extensions
the topic CSS
and puts Ignore
See that after adjusting to Ignore
error no longer appears in tab Problems
or in the CSS file
Ball show bro... Obg... but that was half the problem, the other is the autocomplete... If you put a class in any element in html and then go to it in CSS and place ". classquevcquer", autocomplete does not find that class... but... if you put it all writing at least once, the next time q vc will write this class in the CSS document, then the autocomplete already recognizes... tendeu?
– Tony Ivan
As far as I know this is the normal behavior of VS Code, not hare of in CSS he recognize a class that only exists in HTML and make the autocomplet... never noticed this behavior in the file . css autocomplete a class that is only in HTML...
– hugocsl
What I know is that Intellisense for example in HTML completes the classes that are already discrete in .CSS... You can look here https://stackoverflow.com/questions/45865053/vs-code-detect-css-classes-and-ids-from-html-and-autocomplete and see that there are some extensions that can help you. See the Edite I made right at the beginning of my reply.
– hugocsl