fancy-buttons 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,16 +11,13 @@ Without CSS gradient support:
11
11
  ## Install
12
12
 
13
13
  Install the plugin:
14
-
14
+ sudo gem install compass --pre
15
15
  sudo gem install fancy-buttons
16
16
 
17
- If you don't have compass colors 0.3.1
18
-
19
- sudo gem install compass-colors
20
17
 
21
18
  To create a new project based on fancy-buttons:
22
19
 
23
- compass -r compass-colors -r fancy-buttons -f fancy-buttons your_project_name
20
+ compass -r compass-colors -r fancy-buttons -f fancy-buttons project_directory
24
21
 
25
22
  To add fancy-buttons to an existing compass project:
26
23
 
@@ -29,7 +26,7 @@ To add fancy-buttons to an existing compass project:
29
26
  require 'fancy-buttons'
30
27
 
31
28
  # Then run the following command:
32
- compass -i -f fancy-buttons
29
+ compass -r fancy-buttons -f fancy-buttons project_directory
33
30
 
34
31
  # Project Goals:
35
32
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fancy-buttons}
8
- s.version = "0.3.6"
8
+ s.version = "0.3.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brandon Mathis"]
12
- s.date = %q{2009-12-11}
12
+ s.date = %q{2009-12-15}
13
13
  s.description = %q{Make fancy buttons with the Compass stylesheet authoring framework.}
14
14
  s.email = %q{brandon@imathis.com}
15
15
  s.extra_rdoc_files = [
@@ -20,6 +20,8 @@
20
20
  // Style the button's colors, picking the most appropriate color set for the base color.
21
21
  =fancy-button-colors(!color = !fb_color, !hover = 0, !active = 0)
22
22
  +fb-color(!color, "default")
23
+ &.disabled:active, &.disabled:hover, &[disabled]:active, &[disabled]:hover
24
+ +fb-color(!color, "default")
23
25
  &:hover, &:focus
24
26
  @if !hover == 0
25
27
  +fb-color(darken(!color, 3), "hover", !color)
@@ -95,6 +97,15 @@
95
97
  text-shadow= lighten(!color, 15) !text_shadow_settings
96
98
  color= !fb_dark_text
97
99
 
100
+ =fancy-button-text-colors(!color, !hover, !active)
101
+ color= !color
102
+ &:hover, &:focus
103
+ color= !hover
104
+ &:active
105
+ color= !active
106
+ &.disabled:active, &.disabled:hover, &[disabled]:active, &[disabled]:hover
107
+ color= !color
108
+
98
109
  // Apply this mixin to a nested element to style an arrow
99
110
  =fancy-arrow(!font_size)
100
111
  font-size= !font_size + 4px
@@ -131,7 +142,7 @@
131
142
  &:active
132
143
  padding= !v_padding_active !h_padding_active
133
144
  border-width= !border_width + 1px
134
- &.disabled:active
145
+ &.disabled:active, &[disabled]
135
146
  padding= !v_padding !h_padding
136
147
  border-width= !border_width
137
148
 
@@ -152,8 +163,10 @@
152
163
  padding: 0
153
164
  &:focus
154
165
  outline: none
166
+ &.disabled, &[disabled]
167
+ +disable-button
155
168
 
156
169
  =disable-button(!opacity = .7)
157
170
  +opacity(!opacity)
158
- &:hover
171
+ &:hover, &:focus
159
172
  cursor: default
@@ -21,6 +21,11 @@
21
21
  <button class="light">Click Me</button>
22
22
  <button class="matte-blue">Click Me</button>
23
23
  </div>
24
+ <h2>Disabled Buttons</h2>
25
+ <div>
26
+ <button class="green" disabled>Click Me</button>
27
+ <button class="red" disabled>Click Me</button>
28
+ </div>
24
29
  <h2>Custom Radial Gradient</h2>
25
30
  <div>
26
31
  <button class="custom heart">&hearts;</button>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fancy-buttons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-11 00:00:00 -06:00
12
+ date: 2009-12-15 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency