anjlab-bootstrap-rails 1.4.0.9 → 1.4.0.10

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.
@@ -2,6 +2,7 @@ require "bootstrap-rails/version"
2
2
 
3
3
  module Bootstrap
4
4
  module Rails
5
+ require "bootstrap-rails/ie_hex_str"
5
6
  if ::Rails.version < "3.1"
6
7
  require "bootstrap-rails/railtie"
7
8
  else
@@ -0,0 +1,21 @@
1
+ require "sass"
2
+
3
+ module Sass::Script::Functions
4
+ # returns an IE hex string for a color with an alpha channel
5
+ # suitable for passing to IE filters.
6
+ # see http://msdn.microsoft.com/en-us/library/ms532930%28v=vs.85%29.aspx
7
+ def ie_hex_str(color)
8
+ assert_type color, :Color
9
+ alpha = (color.alpha * 255).round
10
+ alpha = alpha.to_s(16).rjust(2, '0')
11
+ color_string = color.to_s
12
+ color_values = color_string.tr('#','').split('')
13
+
14
+ r, g, b = *color_values
15
+ if color_values.size == 3
16
+ color_string = "#{r}#{r}#{g}#{g}#{b}#{b}"
17
+ end
18
+ Sass::Script::String.new("##{alpha}#{color_string}")
19
+ end
20
+ declare :ie_hex_str, :args => [:color]
21
+ end
@@ -1,5 +1,5 @@
1
1
  module Bootstrap
2
2
  module Rails
3
- VERSION = "1.4.0.9"
3
+ VERSION = "1.4.0.10"
4
4
  end
5
5
  end
@@ -172,7 +172,9 @@
172
172
  background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
173
173
  background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
174
174
  background-image: linear-gradient(left, $startColor, $endColor); // Le standard
175
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1); // IE9 and down
175
+ $ieStartColor: ie_hex_str($startColor);
176
+ $ieEndColor: ie_hex_str($endColor);
177
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$ieStartColor}', endColorstr='#{$ieEndColor}', GradientType=1); // IE9 and down
176
178
  }
177
179
  @mixin gradient-vertical ($startColor: #555, $endColor: #333) {
178
180
  background-color: $endColor;
@@ -184,7 +186,9 @@
184
186
  background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
185
187
  background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
186
188
  background-image: linear-gradient(top, $startColor, $endColor); // The standard
187
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down
189
+ $ieStartColor: ie_hex_str($startColor);
190
+ $ieEndColor: ie_hex_str($endColor);
191
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$ieStartColor}', endColorstr='#{$ieEndColor}', GradientType=0); // IE9 and down
188
192
  }
189
193
  @mixin gradient-directional ($startColor: #555, $endColor: #333, $deg: 45deg) {
190
194
  background-color: $endColor;
@@ -204,7 +208,9 @@
204
208
  background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
205
209
  background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
206
210
  background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
207
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
211
+ $ieStartColor: ie_hex_str($startColor);
212
+ $ieEndColor: ie_hex_str($endColor);
213
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$ieStartColor}', endColorstr='#{$ieEndColor}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
208
214
  }
209
215
 
210
216
  // Gradient Bar Colors for buttons and allerts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anjlab-bootstrap-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.9
4
+ version: 1.4.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-22 00:00:00.000000000 Z
12
+ date: 2011-12-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70204408450820 !ruby/object:Gem::Requirement
16
+ requirement: &70328917429840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70204408450820
24
+ version_requirements: *70328917429840
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &70204408449940 !ruby/object:Gem::Requirement
27
+ requirement: &70328917429340 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.14'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70204408449940
35
+ version_requirements: *70328917429340
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &70204408449200 !ruby/object:Gem::Requirement
38
+ requirement: &70328917428880 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70204408449200
46
+ version_requirements: *70328917428880
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rails
49
- requirement: &70204408448720 !ruby/object:Gem::Requirement
49
+ requirement: &70328917428420 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '3.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70204408448720
57
+ version_requirements: *70328917428420
58
58
  description: Twitter Bootstrap CSS (with SASS flavour) and JS toolkits for Rails 3
59
59
  projects
60
60
  email:
@@ -70,6 +70,7 @@ files:
70
70
  - bootstrap-rails.gemspec
71
71
  - lib/bootstrap-rails.rb
72
72
  - lib/bootstrap-rails/engine.rb
73
+ - lib/bootstrap-rails/ie_hex_str.rb
73
74
  - lib/bootstrap-rails/railtie.rb
74
75
  - lib/bootstrap-rails/version.rb
75
76
  - vendor/assets/javascripts/bootstrap-alerts.js