Skip to content

Commit

Permalink
using tvdeyen's firefox fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jhardy committed Aug 21, 2012
2 parents 749ece1 52f01b4 commit 881d102
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
25 changes: 19 additions & 6 deletions sassy-buttons.gemspec
Original file line number Diff line number Diff line change
@@ -1,13 1,14 @@
Gem::Specification.new do |s|
# Release Specific Information

s.date = "2012-06-23"
s.version = "0.1.1"
s.date = "2012-6-23"

# Gem Details
s.name = "sassy-buttons"
s.authors = ["Jared Hardy"]
s.summary = %q{css only buttons extension for compass}
s.description = %q{Sassy css3 buttons using compass}
s.summary = "css only buttons extension for compass"
s.description = "Sassy css3 buttons using compass"
s.email = "[email protected]"
s.homepage = "http://www.jaredhardy.com"

Expand All @@ -19,6 20,18 @@ Gem::Specification.new do |s|

# Gem Bookkeeping
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6}
s.add_dependency("compass", [">= 0.12.1"])
end
s.rubygems_version = "1.8.24"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=

if s.respond_to? :specification_version then
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<compass>, [">= 0.12.1"])
else
s.add_dependency(%q<compass>, [">= 0.12.1"])
end
else
s.add_dependency(%q<compass>, [">= 0.12.1"])
end
end
16 changes: 9 additions & 7 deletions stylesheets/_sassy-buttons.sass
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 26,7 @@ $sb-second-color: false !default
$sb-border-radius: 5px !default

// Padding that gives button structure.
$sb-padding: 0.3em 1.5em !default
$sb-padding: 0.5em 1.5em !default

// Font size.
$sb-font-size: 16px !default
Expand All @@ -46,22 46,18 @@ $sb-pseudo-states: true !default
// Add gradient png for IE 7
$sb-ie-support: true !default

// Set the default Line height
$sb-line-height: 1.5 !default


// Mixing that gets included when calling the sassy-button-structure if you need any
// styles applied to all your sassy buttons, add it here.
@mixin sassy-button-default-structure
display: inline-block
display: inline

This comment has been minimized.

Copy link
@zuthan

zuthan Aug 24, 2012

Why did you change default display: to inline?
[On Chrome at least] this breaks padding/width etc styling when sassy-button styling is applied to links. If applied to buttons or form elements it has no effect since they remain inline-block anyway.

This comment has been minimized.

Copy link
@jhardy

jhardy Aug 24, 2012

Author Owner

Good question, I did a little more testing and you are correct. I have rolled it back to inline-block in a new gem release and will address the issue this was supposed to fix in another update.

cursor: pointer
line-height: $sb-line-height
text-decoration: none

// The Sassy Button kitchen sink.
@mixin sassy-button($gradient-style: $sb-gradient-style, $border-radius: $sb-border-radius, $font-size: $sb-font-size, $first-color: $sb-base-color, $second-color: $sb-second-color, $text-color:$sb-text-color, $text-style: $sb-text-style, $auto-states: $sb-pseudo-states, $ie: $sb-ie-support)
@include sassy-button-structure($border-radius, $font-size, $sb-padding)
@include sassy-button-gradient($gradient-style, $first-color, $second-color, $text-color, $text-style, $auto-states, $ie)
@include sassy-firefox-fix


// Structure for a sassy button
Expand All @@ -71,3 67,9 @@ $sb-line-height: 1.5 !default
@include sassy-button-default-structure
@include border-radius($border-radius)


// Fix for the Firefox padding issue
@mixin sassy-firefox-fix
&::-moz-focus-inner
padding: 0 !important
margin: -1px !important
2 changes: 2 additions & 0 deletions stylesheets/sassy-buttons/_sassy-button-pseudo-states.sass
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 12,8 @@

@mixin sassy-button-hover($first-color, $second-color, $style)

&:hover
text-decoration: none
@if $style == "matte"
&:hover
background-color: darken($second-color, 5%)
Expand Down

0 comments on commit 881d102

Please sign in to comment.