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

CSS variables across files #156

Open
minkir014 opened this issue May 21, 2019 · 18 comments
Open

CSS variables across files #156

minkir014 opened this issue May 21, 2019 · 18 comments
Assignees
Labels
feature-request Request for new features or functionality
Milestone

Comments

@minkir014
Copy link

Provide CSS variables autocompletion across files.

@aeschli aeschli added the feature-request Request for new features or functionality label May 22, 2019
@aeschli aeschli added this to the Backlog milestone May 22, 2019
@maxgaurav
Copy link

Any update on this?

@MartinDoyleUK
Copy link

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 -- is entered in ANY file (because we not only use them in CSS, but also TSX files and even raw JavaScript via a helper).

@myWsq
Copy link

myWsq commented Mar 15, 2020

Any update on this?

@ronilaukkarinen
Copy link

I'm also looking for this.

@karimshalapy
Copy link

Any update on this?

@gabriellecrawford
Copy link

another vote for this one, we also use variables at Oracle and this would be helpful.

@matronator
Copy link

Is there no hope for this?

@ronilaukkarinen
Copy link

I have been using CSS var Hint extension, it does the job.

@jasonwilliams
Copy link

jasonwilliams commented Apr 22, 2022

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?

@aeschli
Copy link
Contributor

aeschli commented Apr 25, 2022

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.

@jasonwilliams
Copy link

@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?

@aeschli
Copy link
Contributor

aeschli commented Apr 26, 2022

@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'.

@DavidSouther
Copy link

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.

@DavidSouther
Copy link

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.

@johnsoncodehk
Copy link
Contributor

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.

@andelkocvjetkovic
Copy link

andelkocvjetkovic commented Nov 13, 2022

Would be nice if this could work.

@timsofteng
Copy link

+1
would be so helpful

@John60676
Copy link

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.

Any update on this?

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
Projects
None yet
Development

No branches or pull requests