cassette icon indicating copy to clipboard operation
cassette copied to clipboard

dotLess does not handle semicolon parameter separator on mixins

Open mcliment opened this issue 11 years ago • 7 comments

According to Less specification, parameters in a mixin definition or call can be separated by commas or semicolons. In the latter case, the dotless compiler fails.

This makes Bootstrap 3 and other libraries unusable without modifications.

Maybe a Jurassic compiler based on less.js or even via node.js (but would need too many dependencies) can be used instead of dotless.

mcliment avatar Jul 31 '13 06:07 mcliment

This has been opened on dotless repo too but no reply yet. I agree we should look for an alternative compiler to dotless coz it seems they'll be unable to keep development in sync with LESS. Node.js solution with lessc is possible (WinLess does it that way).

brgrz avatar Aug 03 '13 19:08 brgrz

I've made some modifications to Cassette.Less in my fork (https://github.com/mcliment/cassette/tree/master/src/Cassette.Less) to use https://github.com/duncansmart/less.js-windows/tree/windows-script-host. This is ugly WIP and the original idea was to use Less.js inside Jurassic emulating the properties that the less compiler needs and not to use WSH which can be problematic.

mcliment avatar Aug 03 '13 20:08 mcliment

I have Bootstrap 3 working using the same technique as Web Essentials Visual Studio plugin (I was going for guaranteed compatibility with WE). I created an alternate less compiler and am registering that instead of the original. It's not well battle tested yet, but all the unit tests from the original less compiler are passing. Since it's using the original less 1.4.2 JavaScript file it's 100% compatible with Less and relatively easy to upgrade, however, it is Windows only so won't work on Mono/Unix. https://github.com/elerch/Cassette.LessJs

elerch avatar Oct 09 '13 16:10 elerch

@elerch Much more elegant than my ugly solution but basically is the same approach. Using the official LessJs compiler is the best way to ensure perfect results. Nice job.

mcliment avatar Oct 09 '13 21:10 mcliment

Are there any details on how to implement a workaround? I just started setting up a project with Bootstrap 3 and Cassette and am getting this compilation error.

jwynveen avatar Oct 18 '13 18:10 jwynveen

@jwynveen I think @elerch approach is the most reliable way to compile less files, it uses the official less compiler rather than dotless and is up to date with the latest version.

mcliment avatar Oct 19 '13 11:10 mcliment

I think #433 will solve this Issue... also waiting for bootstrap 3 support.

CC1337 avatar Jan 10 '14 15:01 CC1337