lessphp
lessphp copied to clipboard
Bug on compile of variables as propertie
Let's copy example form http://lesscss.org/features/#variables-feature-properties
@property: color;
.widget {
@{property}: #0ee;
background-@{property}: #999;
}
and on compile we have error:
parse error: failed at `@{property}: #0ee; ` .../mixins.less on line 8
I's very sad :(
i found this bug too. hope fixed... sorry for my poor php skills...
I have this issue too. It's not very important in my case, but I will maybe submit a PR if I have time.
I have this error too. Will try to submit a PR.
Ok. Please look if it's a bug (should work but doesn't work) or a simple lack of implementation (a forgetting).
Lack of implementation. lessphp is somewhere in between less.js v1.3.3-1.4.0 while this feature is introduced in v1.6.0.
I think I will try oyejorge/less.php, which seems up-to-date with lesscss. Both this issue and #593 works perfectly with it. I just need to adapt them to assetic.
Zzortell, I tried this other lib and I got issues on math operations like * and / not getting compiled so be careful.
Hum no it seems to work perfectly (use the demo). You need to be careful with math operations in lesscss too, but if you enclose operators with spaces and don't forget enclose the whole operation in case there were troubles about priorities I think it's ok.
Moreover by researching in fact this compiler it's not maintained anymore. leafo said :
I know I'm a little late to this party but as you've probably noticed I don't have much time for this project anymore.
People switched to oyejorge/less.php, and it was implemented in assetic and frameworks as the substitute of leafo/lessphp. leafo himself advise to use oyejorge/less.php.
oyejorge/less.php is (almost) up-to-date and
the code structure of less.php mirrors that of the official processor
After testing all work perfectly, so I definitively switch.
PS: According to people the benefit of leafo/lessphp is high speed, but it's bonus compared to compatibility and features.
PPS: In fact it's not so slow that people say ...