Hi Nathan, thanks for the answer and congrats on this project, it
saved me a lot of time and it's very fun to code css in scss. I'm
already evangelizing the other developers who work with me and we're
building a front-end framework based on sass/scss.

Do you think it's possible to create a mixin where I can pass any even
number of arguments (property / value)?

SCSS:
@mixin firefox-hack ($selector, $values) {
  @-moz-document url-prefix() { $selector { $values; } }
}

@include firefox-hack {
  #myId, values(padding, 10px, margin, 10px)
}

Compiles to CSS:
@-moz-document url-prefix() { #myId { padding: 10px; margin: 10px; } }

I think Compass does something like this on the font-face mixin
(http://compass-style.org/docs/reference/compass/css3/font_face/#mixin-
font-face).


On Dec 28, 6:28 pm, Nathan Weizenbaum <[email protected]> wrote:
> No, there isn't a way to do that.
>
> On Tue, Dec 28, 2010 at 2:54 AM, Renan Couto <[email protected]> wrote:
> > Hello there!
>
> > I wanna know if there's a way of doing the code below:
>
> > SCSS:
>
> > @mixin firefox-hack ($property, $value) {
> >  $property: $value;
> > }
>
> > #myId {
> >  padding: 8px;
> > �...@include firefox-hack { padding: 10px; margin: 10px; }
> > }
>
> > Compiles to CSS:
>
> > #myId {
> >  padding: 8px;
> > }
>
> > @-moz-document url-prefix() { #myId { padding: 10px; margin: 10px; } }
>
> > --
> > 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.

Reply via email to