-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Can't Parse CSS Variables from Svelte File #117
Comments
Thanks for raising the issue. Svelte is not officially supported by this Extension yet. It works in some cases but fails sometimes. I will have to check what's causing the failure in your case. It would be great if you shared a minimal reproduction repo for me to test this out (once I get free from other tasks). |
Here is an example Theme component. This is wrapped around the main app, so that each child has access to the css variables. Happy to help contribute, but not sure I understand much about how this extension works at the moment... Ideally, CSSVar could support a user defined svelte file and build a autocomplete list of the CSS variables within. Even cooler (and more complex) would be for CSSVar to scan all the parent components of a file so you can use any css variable from an active file's parent. Theme component
Implementation of Theme:
|
I checked ur example. Since there's no official parser for If u are interested, you can look into how I strictly avoid adding unnecessary libraries; thus try to create pre-processor from scratch. |
Describe the bug
I use a Theme.svelte file that includes all of the CSS variables inside of a style tag. This does not get parsed by CSSVar, and thus none of my styles are available for autocomplete.
To Reproduce
Steps to reproduce the behavior:
Failed to parse CSS variables in files: xx/Theme.svelte
Expected behavior
Ideally, this would be able to parse the style tag of the Svelte file, which is pure css (or SCSS, if lang is specified).
Screenshots
If applicable, add screenshots to help explain your problem.
Details (please complete the following information):
The text was updated successfully, but these errors were encountered: