If you use lessphp ( http://leafo.net/lessphp/ ) for server-side compilation (instead of the javascript lesscss compiler from http://lesscss.org ) you can link the php function and use it to change the character used to concatenate .
Sample lesscss code:
.linear-gradient(@fallback, @deg, @tail...) { background-color: @fallback; background-image: linear-gradient(@deg, separateByComma(@tail)); background-image: -webkit-linear-gradient(@deg, separateByComma(@tail)); background-image: -moz-linear-gradient(@deg, separateByComma(@tail)); background-image: -o-linear-gradient(@deg, separateByComma(@tail)); } body { .linear-gradient(
Associated php function:
function lesscss_separateByComma($arg) { if($arg[0]=='list') $arg[1]=','; return $arg; }
And to bind and compile lesscss code:
$less=new lessc(); $less->registerFunction('separateByComma', 'lesscss_separateByComma'); $code=$less->compile($code);
Output:
body { background-color: yellow; background-image: linear-gradient(135deg,#FCFCDD,#FFFFFF 66%,#FCFCDD); background-image: -webkit-linear-gradient(135deg,#FCFCDD,#FFFFFF 66%,#FCFCDD); }
Tested with a lower value of 0.4.0.
source share