Thanks I missed "=", I have improved it.
=background(!class)
.#{!class}
:background url(/images/facebox/#{!class}.png)
It works like a charm!!!
On 17 Nov, 23:49, Chris Eppstein <[email protected]> wrote:
> mixins are defined with an equals sign:
>
> =background(!image)
> background: url(/facebox/#{!image})
>
> Then you can mix it in like so:
>
> div
> +background("foo.png")
>
> On Tue, Nov 17, 2009 at 2:46 PM, ricard.forniol
> <[email protected]>wrote:
>
>
>
> > Hi;
>
> > I'm trying to do something like that:
>
> > background(!image)
> > :background url(/facebox/#{!image})
>
> > But I don't know if it's possible. This code says Undefined variable:
> > "!image".
>
> > Thanks
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Haml" group.
> > To post to this group, send email to [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/haml?hl=.
--
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=.