tomyeh / ZUSS

An extension to CSS providing mixins, nested rules, conditional content, variables and seamless Java integration.
http://books.zkoss.org/wiki/ZUSS_Reference
19 stars 5 forks source link

Trouble with rgba as default of mixin parameter #10

Closed gregorko closed 12 years ago

gregorko commented 12 years ago

Hi...

I'm having troubles with the following rule:

@box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) { -webkit-box-shadow: @shadow; -moz-box-shadow: @shadow; box-shadow: @shadow; }

Am I doing something wrong or is it a bug in the parser?

Thanks, Gregor

tomyeh commented 12 years ago

'(' and ',' have special meaning after ':'. They are considered as special symbols of an expression. The solution is to escape it with a quote such as:

@box-shadow(@shadow: '0 1px 3px rgba(0,0,0,.25)') {
    -webkit-box-shadow: @shadow;
    -moz-box-shadow: @shadow;
    box-shadow: @shadow;
}
gregorko commented 12 years ago

Thanks for your help, works perfectly now... Great tool!!