-
Notifications
You must be signed in to change notification settings - Fork 172
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
CSS variables across files #156
Comments
Any update on this? |
In terms of features, this would be really helpful. We use CSS variables to make dynamic theming work slickly, and it would be super helpful to have VSCode find all CSS files with variable definitions in and to then start prompting as soon as |
Any update on this? |
I'm also looking for this. |
Any update on this? |
another vote for this one, we also use variables at Oracle and this would be helpful. |
Is there no hope for this? |
I have been using CSS var Hint extension, it does the job. |
custom properties auto complete is already working within file, so I guess someone would need to try and see how that works, then use some global registry to put the suggestions into so that they can be picked up from any file? This is the highest voted issue on this repo, I wonder if @aeschli is still interested in pursuing this or maybe some people can try having a go? |
Everyone is welcome to tackle this. All css-language-service issues are assigned to me as I maintain the node module, not because I work on them. |
@aeschli could you offer any insight to anyone who would be attempting to fix this issue? Is there a good place to start? or anything to know about? Is hierarchy taken into account with variables or is it just a plain cache all variables go into and are retrieved from? |
@jasonwilliams You can see here how this currently done. We suggest all referenced variables as well as all declared variable in the scope, but only in the current document. There's no following/resolving of imports or searching other files in the 'same project'. |
I would add to this (probably as a follow up request, but if it's added when someone picks the issue up that's awesome) an error on custom properties used in a var() that have no definition. |
A naive first parse of "all custom property left-hand sides" will be over-indexing, in that there are custom properties created in some selectors that would never be applicable to another selector. However, that seems like an exceedingly edge case. |
I want to resolve this when I have time, I think it is not too difficult, but must to have some small changes for API. |
Would be nice if this could work. |
+1 |
Any update on this? |
Provide CSS variables autocompletion across files.
The text was updated successfully, but these errors were encountered: