Comments (9)
book-keeping note: https://stackoverflow.com/q/78604916/11107541
from vscode.
What's happening is that when the code completion is invoked the first time, textual proposals are shown as the CSS language server has no proposals.
Once there's a color name in the file, the CSS language server shows that color. The textual proposals don't show anymore
- textual proposals uses the contents of all open editors
- the css extension only uses the current document
- the textual proposals are considered a 'fallback' is there's no language server providing any results.
from vscode.
Under what circumstances is this likely to be addressed?
- Without any
@import
s? - If the variable-using file
@import
s the variable-declaring file(s)? - If some other CSS file
@import
s them both (or HTML<link>
s them both)- the variable-declaring file first?
from vscode.
aeschli, it doesn't seem to matter what the type of property is...for example if I add a property of --myvalue: 32; and then assign the width: var(--myvalue) and further down try to assign the color: var(--xx); it offers me only --myvalue (an integer) and not one of the color properties. Does this fit within the same explenation?
from vscode.
Yes, the css extension doesn't know what type the variable is. It just proposes all variable names that it can find in the current document.
Following imports is currently not planed. But I can look into looking at the contents of all open editors that show CSS files.
from vscode.
Thanks very much for looking into the problem. From my perspective it would seem that displaying all of the properites every time would be very beneficial. Without that functionality, it degrades the usefulness of the custom properties. Instead of Intellisense including those choices each time, it forces me to go back to a long list of properties in 1 or more files each time I want to use one. A more sensible way might be to always show all of the textual proposals and then maybe either order by or highlight those that also already exist in the current document, but having them disappear makes no sense and is not useful at all. Thanks again!
from vscode.
I can look into looking at the contents of all open editors that show CSS files
Would this just be for custom properties declared in a rule with the :root
selector? That would be the safer option correctness-wise. Even then, it'd be risking wrong suggestions with shadow DOM involved.
from vscode.
Available variables are only known at runtime, when a rule is matched. Even then it's not wrong to access an undefined variable
So proposing all variables found is what we should do.
from vscode.
I would think it should behave the way it does the first time you use var() ... using it a second or nth time shouldn't change the behaviour, which it now does...consistency is best.
from vscode.
Related Issues (20)
- **NEW-Method]** Free High Rise Cheats Gold Generator 2024 Free New Method No Human Verification
- [NEW-WORKING]** High Rise Cheats Gold Generator in-2024 New Edition No Human Verification
- (Newest-Update)^* Free High Rise Cheats Gold Generator 2024 No-Survey No Veyfication
- Typescript ignores package.json export maps HOT 2
- ^*NEWEST^* Chipotle Gift Card Generator in-2024 Daliy Working New Way Updated Method
- [Update]*^ Chipotle Gift Card Generator Working in-2024 No Verification No-Survey
- [New-Latest]** Chipotle Gift Card Generator in-2024 Free Working New Update Method No-Survey
- ^*Get-Free** Chipotle Gift Card Generator 2024 Easy Method New Edition
- Additional text before the first output line from a Python program in terminal HOT 1
- ^^REAL-FREE!!* Chipotle Gift Card Generator 2024 New Method No Human Verification
- High CPU usage from "gpu-process" and low framerate when scrolling througheven small (<200) line files HOT 2
- Debian package `postinst` interferes with DEB822 repo style
- Debian package `postinst` should not install keyring to Dir::Etc::trustedparts (/etc/apt/trusted.gpg.d)
- linking html to css HOT 2
- CPU usage issue HOT 2
- 'undo' does not work in jupyter notebook cells HOT 2
- Open folder not reused window with multi root workspace HOT 2
- The JS/TS language service crashed. TVisualStudioExptTeam.vscodeintellicode, VisualStudioExptTeam.vscodeintellicode, Vue.volar. HOT 1
- dfg
- Very slow UI out of a sudden HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode.