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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1310758-less-lessphp-v0.3.0.patch | 39.68 KB | victoriachan |
| lessphp-v0.3.0.patch | 39.69 KB | bforchhammer |
Comments
Comment #1
matthewv789 commentedI'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.
Comment #2
Fidelix commentedmatthewv789, 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.
Comment #3
victoriachan commentedThanks for the patch! I'm just resubmitting a version of the patch that works without prefix (ie. within the less directory).
Comment #4
td540 commentedAbsolutely agree. High priority!
And how about a 6.x-3.x branch ?
Comment #5
marcvangendFYI: 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.
Comment #6
corey.aufang commentedThe 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.
Comment #7
corey.aufang commentedQuick 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?.
Comment #8
marcvangendLibrary 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?
Comment #9
attiks commentedI'm also in favor of not including it and using libraryapi instead.
FYI version 0.3.1 has been released a couple days ago
Comment #10
dale386 commentedMy 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.
Comment #11
Fidelix commentedMake sure your lessphp folder is named lessphp, not anything else.
Comment #12
corey.aufang commentedClosing this as the procedure to use a 0.3.x+ version of lessphp is to follow the instructions on the project page.