TheRealSyler / vscode-sass-indented

Sass indented syntax support for VSCode
https://marketplace.visualstudio.com/items?itemName=Syler.sass-indented
Other
43 stars 9 forks source link

How does the magic comment work #108

Closed shane-peterson closed 1 year ago

shane-peterson commented 1 year ago

if you want to only import the css variables, you can easily do that by using a magic comment //import css-variables from .

How does it work, can you give an example?

Thank you so much!!

TheRealSyler commented 1 year ago

lets say you have file a.sass and file b/b.sass

a.sass

body
  --var: 200px

b/b.sass

//import css-variables from ../a

.class 
  margin: var(--var)

you should get autocompletion in the var() with the variables declared in a.sass, im not sure if it works with sass variables.

TheRealSyler commented 1 year ago

i think for sass variable you need to use the @import/@use but it im not sure if it still works.