imathis / fancy-buttons

Fancy CSS Buttons using Compass
http://brandonmathis.com/projects/fancy-buttons/
819 stars 55 forks source link

make button image url a variable #4

Closed bridiver closed 14 years ago

bridiver commented 14 years ago

It would be much easier to manage the location of the button graphic if it was a variable

!fb_button_image ||= #{image_url("button_bg.png")}

or something similar

imathis commented 14 years ago

Seems like a great idea, thanks. I'll put in the next version.

imathis commented 14 years ago

Ok I've done this in the latest version: !fb_image_path will allow you to set the path for the button's background image. It defaults to image_url("button_bg.png").

Thanks for the idea.

seivan commented 14 years ago

!fb_button_image ||= #{image_url("button_bg.png")}

Using ruby interpolation there doesn't seem to work... I keep getting error src/buttons.sass (Line 153: Undefined variable: "!fb_bg_image_path".)

imathis commented 14 years ago

aww blast, thanks. I'll see what I can do.

imathis commented 14 years ago

I've just pushed 0.3.9 to gemcutter, this should fix the path issue. Sorry about that.

You'll want to set !fb_image_path not !fb_button_image. Let me know if this works how you expect it to.