i figured it out. i was passing in the arguments as strings. it works
like this:

    +mixin(1, 300, 500)

    &:hover
      :left = (!pos_x - 50)+"px"
      :top = (!pos_y - 100)+"px"



On Aug 29, 2:01 pm, rvr <[email protected]> wrote:
> is there a way to perform a math operation with a mixin argument? i
> can't figure out the syntax to get a result. here's what i'm trying to
> do:
>
> =mixin(!arg1, !pos_x, !pos_y)
>   li#act-#{!arg1}
>     :left #{!pos_x}px
>     :top #{!pos_y}px
>     &:hover
>       :left = #{!pos_x}px - 50px
>       :top = #{!pos_y}px - 100px
>
> that throws an error because it doesn't like the interpolation token
> at the beginning i think.
--~--~---------~--~----~------------~-------~--~----~
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