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
|
Hello, I just bought Web Workbench and Less is not working. I have a Test.less file which contains only the following: @Arial: Arial, 'Nimbus Sans L', 'Helvetica Neue', Helvetica, sans-serif; .Clear { overflow: hidden; display: inline-block; // Trigger "hasLayout" in IE display: block; // Element back to block } // Clear .Background(@color: transparent, @image: "", @repeat: no-repeat, @position: top left) { background: @color @image @repeat @position; } // Background And the output is only the following: .Clear { overflow: hidden; display: inline-block; display: block; } I tested with other files and the same happens. What is wrong? Thank You, Miguel |
|
|
The @Arial line does not get emitted because it is a variable declaration. It will be substituted if you use the @Arial variable somewhere in your Less file. The .Background line does not get emitted because it is parameterised and can thereforew only be used as a mixin. Take a look at the "Mixins" section at http://lesscss.org/#synopsis -- notice how the translated CSS doesn't contain a Change your code to something like:
|
|
|
Sorry, Maybe I explained myself wrong. I have four files: Base.less, Core.less, Main.less and Plug.less. Base.less and Core.less have the variables and mixins and are rendered fine to Base.css and Core.css. When I check Main.css which uses those variables and mixins I get the error: Less compiler error: error: No matching definition was found for On Main.css I am using the following: @import "Core.less"; @import "Base.less"; // Rest of code. The reason why I have these two lines is without them I do not have Syntax Highlighting in Mains.less. So I am not sure how to make this work. How can I solve this? A side question: Why is the code in minimized files not on the same line? Wouldn't that be better? Thank You, Miguel |
|
|
Okay, I am not sure how your Test.less fits into this. Your Main.less will need the imports to access the variables and mixins from Base and Core. I'm not sure why you're getting the error on .Wrap -- the best thing is to post the Main.less file and the file where the .Wrap mixin is defined, so we can see the relationship and the definition. The minimisation is done by the Yahoo YUI compressor, which leaves newlines between selectors. We'll keep an eye open for different compression options though. |
|
|
Hello, I will try to better point the problems.
Thank You, Miguel |
|
|
Thanks for the additional info. I can now reproduce the problem and will investigate a solution. I'll also take a look at the exceptions you reported -- thanks for the details! |
|
|
Hello Miguel, It looks like the mixin issue was down to an older version of the Less compiler. I've made a beta build for you with the 1.1.5 Less compiler and this appears to fix the issue. I've also made a couple of changes which I think will fix the exceptions you reported. The beta build is available at: http://assets.mindscape.co.nz/Downloads/Mindscape.WebWorkbench.Integration.10.vsix (You may need to manually uninstall the existing version via Extension Manager first.) We had to make a few internal changes to handle some changes in the 1.1.5 compiler, so please do report any regressions or faults. (If you hit any showstopping faults, you can always revert to the previous version by re-downloading from the Visual Studio Gallery.) If you don't find any problems, we'll release this to the Visual Studio Gallery in the next few days. |
|
|
Hello, I ran the new version with a 4000 code line less file and all went fine. Thank you. If you don't mind let me leave here a few suggestions: 1 - Add two options on Web WorkBench options:
2 - Add Ajax Minifier (http://ajaxmin.codeplex.com/) for both CSS files and JS Files. Maybe you could add their options on Web Workbench options.
3 - Extend YUI Compressor to JS Just some ideas. Thank You, Miguel |
|
|
Glad to hear that sorted the problem. We have an item on the backlog to provide more fine control over what gets compiled, what gets minified, etc. We appreciate that some users prefer to use their own compilers and/or minifiers. However we need to make some architectural changes before we can implement this additional flexibility. We hope to be able to resource this soon but I can't make any promises. Thanks for the feedback though -- we always appreciate suggestions and we do prioritise based on what people ask for! |
|