Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color completion not previewing colors when non-hex variables are present #166201

Open
allan2 opened this issue Nov 12, 2022 · 2 comments
Open

Color completion not previewing colors when non-hex variables are present #166201

allan2 opened this issue Nov 12, 2022 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality suggest IntelliSense, Auto Complete
Milestone

Comments

@allan2
Copy link

allan2 commented Nov 12, 2022

This issue is related to #166197 but diferent. That issue is for color completion only showing for hex variables and not for other types like RGB, RGBA, or string.

This one is for color completion not previewing colors at all, including for hex variables, under certain conditions.

Issue Description

When non-hex variables are present, the color square and color code sometimes don't show up in the autocomplete suggestions.

Example code is here https://github.com/allan2/vs-code-css-color-issue
Tested on VS Code October 2022 with extensions disabled.

Issue in detail

color-completion-1-bug

This bug occurs when there are variables of mixed sources, such as hex and RGB. Notice how the color square and color code are present in the beginning when $ is typed, but missing in the end when we type $. (Note that there is also an autocompletion that occurs when the colon is typed, more on that later)

color-completion-2-backspace-resets

Backspacing resets the list so that the squares are displayed again.

color-completion-3-copy-paste

I noticed this when copying and pasting color: . This suggests that the autocompletion on colon insertion is also related to this bug.

color-completion-4-hex-only

No bug when variables are hex-only.

Additional comments

This issue is about what happens when the variable is completed. The last character typed would be $.
step3

But could it be more useful earlier? After typing the property color, this is what happens:

A colon is inputted. The result:
step1
A lot is shown, and this makes sense to do so.

A space is inputted. The result:
step2

Could I suggest that variables also be shown in this list? And that the $ would filter to the list of variables?

@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa
Copy link

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality suggest IntelliSense, Auto Complete
Projects
None yet
Development

No branches or pull requests

3 participants