Hi,

The new lessphp branch (0.3.0) adds a number of syntax changes which improve compatibility with the original less compiler (lessjs, http://lesscss.org/). Notable changes:

  • Mixins now uses commas instead of semicolons for separating parameters, e.g. .gradient(@color: #F5F5F5, @start: #EEE) instead of .gradient(@color: #F5F5F5; @start: #EEE). This applies to mixin definitions as well as usage.
  • Parametric mixins are not compiled into the output css anymore (v0.2.1 does that)
  • ~ is now supported as an escape character
  • Better support for the parent selector &

These changes make it a lot easier to use 3rd-party less stylesheets, and I think should be included in the module. The downside is that any stylesheets written for v2 will have to be checked and updated respectively...

So, in order not to break any existing sites, I'd like to propose the creation of a new git branch for the 0.3.0 branch of lessphp. Attached patch replaces the lessphp library with the latest version from github.

Thanks,
Ben

Comments

matthewv789’s picture

I'd say getting this out as the default for new downloads should be a pretty high priority. I honestly found 0.2.1 so borderline unusable and frustrating I was on the verge of switching to SASS (or almost even back to straight CSS).

0.3.0 fixed basically all the problems and works great (aside from not being able to import other less files, but that's another issue). I wouldn't be using LESS right now if I hadn't upgraded the PHP library to 0.3.0.

Fidelix’s picture

matthewv789, I agree with you. I ALMOST ended up using SASS, because I could not use the Twitter Bootstrap library, and several other tools out there.

I agree that this should be a high priority, but should be a different branch.

victoriachan’s picture

StatusFileSize
new39.68 KB

Thanks for the patch! I'm just resubmitting a version of the patch that works without prefix (ie. within the less directory).

td540’s picture

Absolutely agree. High priority!
And how about a 6.x-3.x branch ?

marcvangend’s picture

FYI: lessphp 0.3.0 was officially released on November 27th 2011.
I'd love to see it in this module, both the D6 and D7 versions.

corey.aufang’s picture

The current version of the module has Libraries API support.

If you download the latest version of lessphp and place in the libraries folder, it should be automatically detected and used in place of the bundled version.

I will be working on an update to the module to include the 3.0 version of lessphp, but until that occurs the best solution is to use the libraries method.

I'm going to update the module page to show that the module has Libraries API support.

corey.aufang’s picture

Quick update:

Due to changes in d.o policy the next major version of this module will most likely NOT include the lessphp library, and it will have to be downloaded separately.

You can view the discussion here #753714-11: lessphp license?.

marcvangend’s picture

Library API works great for me. I guess that encouraging / forcing users to download the most recent version, instead of using whatever comes with the module, is better in the end. It puts less strain on the module maintainer and the user will have better code (assuming that the newest version is the best :-))

Does #7 mean that this issue can be closed?

attiks’s picture

I'm also in favor of not including it and using libraryapi instead.

FYI version 0.3.1 has been released a couple days ago

dale386’s picture

My install of the less preprocessor is not picking up lessphp 0.3.3 in my sites/all/libraries folder. I double checked spelling and permissions. Any ideas? I've been able to temporarily work around the problem by moving the updated less php file into the module directory, but I know that this is a major no-no.

Fidelix’s picture

Make sure your lessphp folder is named lessphp, not anything else.

corey.aufang’s picture

Status: Active » Closed (won't fix)

Closing this as the procedure to use a 0.3.x+ version of lessphp is to follow the instructions on the project page.