sublime-list-stylesheet-vars icon indicating copy to clipboard operation
sublime-list-stylesheet-vars copied to clipboard

Add an @import support

Open zoxon opened this issue 10 years ago • 3 comments

The plugin works only in the current file, please do the treatment variables from other files connected using @import all variables were taken

zoxon avatar Oct 02 '14 08:10 zoxon

@import support is already in place, can you clarify what exactly is not working?

MaciekBaron avatar Oct 02 '14 10:10 MaciekBaron

Hello. I use the stylus. I have a file variables.styl, the index file for mixins is mixins.styl and the main stylesheet. In mixins.styl connect everything I need including variables.styl

@import 'nib'
@import '/lib/variables'
@import '/lib/mixins/font'
@import '/lib/mixins/normalize'

At the beginning of the main file styles connected mixins.jade, but the variables are defined in variables.styl missing.

Maybe it's due to the fact that the variables are in the third file. (main.styl → mixins.styl → variables.styl)

Thank you

zoxon avatar Oct 02 '14 17:10 zoxon

Yes, at the moment import support only works for one level of depth, that is, it will read imports in the files you are working on but it will not continue reading files that are imported by your imported files. Getting a bit of a inception situation here...

This could be added in the future, perhaps if I introduce some caching to improve performance. At the moment the variables are read when you execute the command. Definitely a nice feature to work on.

MaciekBaron avatar Oct 03 '14 10:10 MaciekBaron