Skip to content

Commit

Permalink
fancy-buttons now requires compass 0.10, example now uses relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
imathis committed Nov 30, 2009
1 parent 0f3774d commit 8936a90
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 65 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ begin
gemspec.email = "brandon@imathis.com"
gemspec.homepage = "http://github.com/imathis/fancy-buttons"
gemspec.author = "Brandon Mathis"
gemspec.add_dependency('haml', '>= 2.2')
gemspec.add_dependency('compass', '>= 0.8')
gemspec.add_dependency('haml', '>= 2.2.14')
gemspec.add_dependency('compass', '>= 0.10')
gemspec.add_dependency('compass-colors', '>= 0.3.1')
gemspec.files = []
gemspec.files << "fancy-buttons.gemspec"
Expand Down
6 changes: 1 addition & 5 deletions example/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
# Require any additional compass plugins here.

project_type = :stand_alone
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "src"
images_dir = "images"
output_style = :compact
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
relative_assets = true
2 changes: 1 addition & 1 deletion example/src/buttons.sass
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ a.button, button
&.green
+fancy-button-colors(!green)
&.blue
+fancy-button-size(32px, 32px, 3px)
+fancy-button-colors(!blue)
+fancy-button-size(32px, 32px)
&.red
+fancy-button-colors(!red)
&.yellow
Expand Down
47 changes: 0 additions & 47 deletions lib/sass/_border_radius.sass

This file was deleted.

15 changes: 6 additions & 9 deletions lib/sass/_fancy_buttons.sass
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import border_radius.sass
@import compass/css3.sass
@import fancy_gradient.sass

!default_button_font_size ||= 18px
Expand Down Expand Up @@ -57,15 +57,9 @@
// Layout the button's box
=fancy-button-structure(!font_size = !default_button_font_size, !radius = !default_button_radius, !border_width = !default_button_border_width, !line_height = !font_size * 1.2)
+fb-reset
+fancy-button-size(!font_size, !radius, !line_height)
border-width= !border_width
&:active
border-width= !border_width + 1px
&.disabled:active
border-width= !border_width

=fancy-button-size(!font_size = !default_button_font_size, !radius = !default_button_radius, !line_height = !font_size * 1.2)
+fancy-button-size(!font_size, !radius, !border_width, !line_height)

=fancy-button-size(!font_size = !default_button_font_size, !radius = !default_button_radius, !border_width = !default_button_border_width, !line_height = !font_size * 1.2)
// better padding for smaller buttons
!v_padding = 0
!h_padding = 0
Expand All @@ -83,10 +77,13 @@
padding= !v_padding !h_padding
font-size= !font_size
line-height= !line_height
border-width= !border_width
&:active
padding= !v_padding_active !h_padding_active
border-width= !border_width + 1px
&.disabled:active
padding= !v_padding !h_padding
border-width= !border_width

// Reset the button's important properties to make sure they behave correctly
=fb-reset(!font_weight = !default_button_font_weight)
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/project/buttons.sass
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ a.button, button
&.green
+fancy-button-colors(!green)
&.blue
+fancy-button-size(32px, 32px, 3px)
+fancy-button-colors(!blue)
+fancy-button-size(32px, 32px)
&.red
+fancy-button-colors(!red)
&.yellow
Expand Down

0 comments on commit 8936a90

Please sign in to comment.