microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.24k stars 28.87k forks source link

[css] propose ids used in other selectors #43365

Open Skeletoo opened 6 years ago

Skeletoo commented 6 years ago

Issue Type

Bug

Description

i have issues when i try to use suggestion for css files. for classes works well but when i'm using for id i have no suggestions try it with a file with like 500 lines of code

VS Code Info

VS Code version: Code 1.20.0 (c63189deaa8e620f650cc28792b8f5f3363f2c5b, 2018-02-07T17:09:39.780Z) OS version: Windows_NT x64 10.0.16299

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2195)| |Memory (System)|3.91GB (0.52GB free)| |Process Argv|C:\Program Files\Microsoft VS Code\Code.exe| |Screen Reader|no| |VM|0%|
Extensions (5) Extension|Author (truncated)|Version ---|---|--- rainbow-brackets|2gu|0.0.6 vscode-eslint|dba|1.4.5 vsc-material-theme|Equ|1.3.0 prettier-vscode|esb|1.1.3 LiveServer|rit|3.2.0

Reproduces without extensions

aeschli commented 6 years ago

Thanks for the issue. I update https://github.com/Microsoft/vscode/issues/28442 to also include ids. Marking as dup.

usernamehw commented 6 years ago

@aeschli If I understood correctly this issue is unrelated to HTML. It's about autocomplete of #id in CSS files which is now working fine for .class.

@Skeletoo Is this involves HTML or not?

aeschli commented 6 years ago

Oh, I assumed this is about completing id selectors in CSS. The list of suggestion would require looking at HTML files to see what ids are used there. @Skeletoo Please correct me if I got this wrong.

Skeletoo commented 6 years ago

@aeschli if i have an #id created in the CSS file and i want to use it again(in the same file) i have no suggestion at all, for .classes works well

Skeletoo commented 6 years ago

@usernamehw in HTML files i'm not getting suggestions at all, i'm not sure if that suppose to happen or not

usernamehw commented 6 years ago

No, in HTML there is no suggestions by default. Probably can be done with extensions, like: https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion#overview

aeschli commented 6 years ago

@Skeletoo Thanks I updated the title and un-duplicated...

tluanga34 commented 6 years ago

I too have a problem with this. Already declared, selected id's in the same CSS file is not suggesting while creating new rules. I'm expecting the same behavior as the class name suggestion which is very convenient.

The same thing happens to custom HTML element /tags.