This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Currently it seems that Less @imported files are not handled. So if an imported file defines a variable, this variable will still be marked as undefined in the final file. Example: if common.less defines variable myColor, then @myColor will still be reported as undefined in the following final.less file: @import "common.less"; Is this normal? |
|
|
Yes, this is a limitation in current builds of Web Workbench. We're looking at whether we can handle imports, but we've got a few concerns about performance when there are a lot of imported files in play. How many .less files do you think you're likely to be importing (including cascading imports)? Just two or three, or do you do a lot of factoring out of mixins etc.? Thanks! |
|
|
No idea at the moment but there could be a lot of factoring, yet no (or few) cascading imports. Should performance concerns prevent it from being possible at all, then could there be an option to at least deactivate the errors detection (so we'd left with colors, formatting... which is great already)? |
|
|
Oh, no, I agree it should still be possible, I'm just trying to figure out whether to do it the easy but slow way, or whether to invest the time performance tuning it. Sounds like the easy but slow way should suffice to get started, and we can look at improvements if it starts to cause problems. Thanks for the info -- we'll try to get you something soon! |
|
|
I've implemented support for imported files and it will be included in the next update (should be on the Visual Studio Gallery in the next 24 hours). Please do let us know if you see performance issues with complex import graphs -- we've not attempted any kind of tuning at this stage and we'll be guided by feedback on whether this is required. One thing to watch out for is that we only update our squigglies when you edit the containing file. So if you have a missing variable and you add that variable to an import file, we won't pick up that the variable now exists until you edit or reopen the file which uses the variable. Similarly we recompile files only when they change, so if you change an imported file, that won't automatically recompile the files that import it. We'll look into whether we can add automatic recompilation of dependencies in a future release. |
|
|
Oops, ignore the comment about recompilation. That only applies to Sass users, not Less users. |
|
|
Just updated. From what I can see it just works now -- and I don't notice performance issues at the moment. |
|