This is a syntactic limitation at this time. You can move the unquote call inside the mixin:
=box-shadow($shadow) $shadow : unquote($shadow) :box-shadow $shadow :-moz-box-shadow $shadow :-webkit-box-shadow $shadow And this will preserve your existing api. In compass, we have simplified the call to the gradient mixins with multiple color stops with a ruby-based function. This is a lot of work and outside the realm of what normal users should be expected to do. We have plans for the sass 3.2 release to support a new list datatype that might enable us to create support for mixins with variable arguments. I think that's the only way the need for strings could be avoided here but many nathan has some ideas. Chris On Fri, Apr 16, 2010 at 12:45 PM, Shawn Allison <[email protected]>wrote: > I have the following mix-in: > > =box-shadow( $shadow) > :box-shadow $shadow > :-moz-box-shadow $shadow > :-webkit-box-shadow $shadow > > If I want to specify multiple box shadows on an element, the only way > I can get it to work, without Sass 3 beta breaking, is in the > following manner: > > #foo > +box-shadow(unquote("1px 1px 0 red, -1px -1px solid blue")) > > I realize without the unquote() Sass thinks I'm listing two arguments. > This was never an issue prior to Sass 3, as I would just wrap the > values in quotes to make it a string. > > Is there a better way to do this? Or even some way I could incorporate > the unquote() as part of the original mix-in setup? > > Thanks in advance. > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected] <haml%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/haml?hl=en.
