Originally posted by nikovitto in #954834: the module processed more than one variable will take problems!:

So we can use ; between variables like this :

.gradient(@startcolor:#c0a56e;@endcolor:#9b7d48){
...
}

But "," or ";" not working when you want override this variables in an other id or class CSS

#site-header{
.gradient(@startcolor:#ffffff;@endcolor:#333333);
}

Fatal error: Uncaught exception 'Exception' with message 'parse error: failed at `.gradient(@startcolor:#ffffff,@endcolor:#333333)` line: 50' in modules/less/lessphp/lessc.inc.php:1244

Stack trace:
#0 modules/less/lessphp/lessc.inc.php(1232): lessc->throwParseError()
#1 modules/less/less.module(43): lessc->parse('/**************...')
#2 modules/less/less.module(73): _less_build(Array, 'page')
#3 [internal function]: less_preprocess_page(Array, 'page')
#4 includes/theme.inc(697): call_user_func_array('less_preprocess...', Array)
#5 in modules/less/lessphp/lessc.inc.php on line 1244

Any solution ?

Thx

And a followup:

I found this solution to override the variables :

.gradient(@startcolor:#c0a56e;@endcolor:#9b7d48){
background-image: -moz-linear-gradient(top, @startcolor, @endcolor);
....
}

.gradient(@startcolor:#c0a56e;@endcolor:#9b7d48){} <=== override before

#myDiv{
.gradient;
}

but it's not a clean solution

Comments

corey.aufang’s picture

Here are the specifics regarding syntax supported by the library that this module uses http://leafo.net/lessphp/docs/#args

I believe what you want to do is:

.gradient(@startcolor:#c0a56e;@endcolor:#9b7d48){
background-image: -moz-linear-gradient(top, @startcolor, @endcolor);
....
}

#myDiv{
.gradient(#c0a56e; #9b7d48);
}
nikovitto’s picture

Yes, it works perfectly, thanks :-)

corey.aufang’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.