facades 1.0.9 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,37 @@
1
+ require 'active_support/all'
2
+
3
+ namespace :generate do
4
+
5
+ desc "Generate FontAwesome icon config"
6
+ task :fa do
7
+ css = read_css('fa.css')
8
+ # ?v=4.0.1
9
+ data = {
10
+ 'name' => "FontAwesome",
11
+ 'version' => "4.0.1",
12
+ 'icons' => {},
13
+ 'fonts' => {
14
+ "eot" => "//netdna.bootstrapcdn.com/font-awesome/4.0.1/fonts/fontawesome-webfont.eot?v=4.0.1",
15
+ "eot2" => "//netdna.bootstrapcdn.com/font-awesome/4.0.1/fonts/fontawesome-webfont.eot?#iefix&v=4.0.1",
16
+ "ttf" => "//netdna.bootstrapcdn.com/font-awesome/4.0.1/fonts/fontawesome-webfont.ttf?v=4.0.1",
17
+ "woff" => "//netdna.bootstrapcdn.com/font-awesome/4.0.1/fonts/fontawesome-webfont.woff?v=4.0.1",
18
+ "svg" => "//netdna.bootstrapcdn.com/font-awesome/4.0.1/fonts/fontawesome-webfont.svg?v=4.0.1#fontawesomeregular"
19
+ }
20
+ }
21
+ css.to_s.scan(/\.fa\-(\S+)\:before\s?.*\s+content.*\\([a-z0-9]{4,})/).each do |matches|
22
+ name, content = matches
23
+ data["icons"].merge!(name.underscore => %Q{#{content}})
24
+ end
25
+ File.open( File.join(base_dir, 'font-awesome.yml'), 'w+') do |file|
26
+ file.write(YAML.dump(data))
27
+ end
28
+ end
29
+
30
+ def base_dir
31
+ File.expand_path('../', __FILE__)
32
+ end
33
+
34
+ def read_css(file)
35
+ File.read File.join( base_dir, 'css', file)
36
+ end
37
+ end
@@ -45,8 +45,9 @@ $legacy-support-for-ie7:false;
45
45
  // - Facades
46
46
  // - FontAwesome
47
47
 
48
- $icon-pack:'facades' !default;
49
- $icon-font-family:icon-font($icon-pack) !default;
48
+ $icon-pack:'font-awesome' !default;
49
+ $icon-font-family:icon-font-name($icon-pack) !default;
50
+ $icon-pack-version:icon-version($icon-pack) !default;
50
51
 
51
52
  $link-color: #00e !default;
52
53
  $link-visited-color: darken($link-color, 5%) !default;
@@ -4,5 +4,5 @@ $grid-background-baseline-color: #efefef !default;
4
4
  $grid-align: ($line-height / $font-size) * 1em;
5
5
 
6
6
  @mixin debug-baseline{
7
- @include baseline-grid-background($grid-align);
7
+ @include baseline-grid-background($grid-align);
8
8
  }
@@ -58,4 +58,18 @@
58
58
 
59
59
  @mixin icon-content($name){
60
60
  content:"#{icon-glyph($name, $icon-pack)}";
61
+ }
62
+
63
+
64
+ @mixin icon-font{
65
+ @font-face {
66
+ font-family: $icon-font-family;
67
+ src: url(icon-font-url($icon-pack, 'eot'));
68
+ src: url(icon-font-url($icon-pack, 'eot2')) format('embedded-opentype'),
69
+ url(icon-font-url($icon-pack, 'woff')) format('woff'),
70
+ url(icon-font-url($icon-pack, 'ttf')) format('truetype'),
71
+ url(icon-font-url($icon-pack, 'svg')) format('svg');
72
+ font-weight: normal;
73
+ font-style: normal;
74
+ }
61
75
  }
@@ -9,68 +9,69 @@ $experimental-support-for-khtml: false !default;
9
9
  @import 'facades/mixins/rhythm';
10
10
  @import 'compass/css3';
11
11
  @import 'facades/mixins/gradients';
12
+ @import 'facades/mixins/media';
12
13
 
13
14
  // Custom opacity mixin, uses whole numbers instead of floats.
14
15
  @mixin opacity($opacity: 100) {
15
- @if $legacy-support-for-ie7{
16
- filter: alpha(opacity=#{$opacity});
17
- }
18
- @if $legacy-support-for-ie8{
19
- -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$opacity})";
20
- }
21
- opacity: $opacity / 100;
16
+ @if $legacy-support-for-ie7{
17
+ filter: alpha(opacity=#{$opacity});
18
+ }
19
+ @if $legacy-support-for-ie8{
20
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$opacity})";
21
+ }
22
+ opacity: $opacity / 100;
22
23
  }
23
24
 
24
25
  // override compass's version because we don't need prefixing
25
26
  @mixin border-radius($radians){
26
- border-radius:$radians;
27
+ border-radius:$radians;
27
28
  }
28
29
 
29
30
  // compass uses the overflow style clearfix which can be rather annoying when you
30
31
  // dont want overflow:hidden on things.
31
32
  @mixin clearfix{
32
- &:before, &:after{
33
- content:"";
34
- display:table;
35
- }
36
-
37
- &:after{
38
- clear:both;
39
- }
40
-
41
- @if $legacy-support-for-ie8 or $legacy-support-for-ie7{
42
- &{ zoom:1; }
43
- }
33
+ &:before, &:after{
34
+ content:"";
35
+ display:table;
36
+ }
37
+
38
+ &:after{
39
+ clear:both;
40
+ }
41
+
42
+ @if $legacy-support-for-ie8 or $legacy-support-for-ie7{
43
+ &{ zoom:1; }
44
+ }
44
45
  }
45
46
 
46
47
  // Custom box-shadow mixin to skip false or none values
47
48
  @mixin optional-box-shadow($props){
48
- @if $props != false and $props != none{
49
- @include border-radius($props);
50
- }
49
+ @if $props != false and $props != none{
50
+ @include border-radius($props);
51
+ }
51
52
  }
52
53
 
53
54
  // Custom border-radius mixin to skip false or none values
54
55
  @mixin optional-border-radius($props){
55
- @if $props != false and $props != none{
56
- @include border-radius($props);
57
- }
56
+ @if $props != false and $props != none{
57
+ @include border-radius($props);
58
+ }
58
59
  }
59
60
 
60
61
  // Cross browser inline-block implementations
61
- @mixin inline-block($align: middle){
62
- display: inline-block;
63
- vertical-align: $align;
64
- @if $legacy-support-for-ie7{
65
- *display: inline;
66
- *vertical-align: auto;
67
- *zoom:1;
68
- }
62
+ @mixin inline-block($align: middle){
63
+ display: inline-block;
64
+ vertical-align: $align;
65
+ @if $legacy-support-for-ie7{
66
+ *display: inline;
67
+ *vertical-align: auto;
68
+ *zoom:1;
69
+ }
69
70
  }
70
71
 
71
72
  @mixin user-select($val: "none"){
72
- @include experimental("user-select", unquote($val), -moz, -webkit, -khtml, -ms, official);
73
- @include experimental("touch-callout", unquote($val), -webkit, official, not -moz, not -khtml, not -ms);
73
+ @include experimental("user-select", unquote($val), -moz, -webkit, -khtml, -ms, official);
74
+ @include experimental("touch-callout", unquote($val), -webkit, official, not -moz, not -khtml, not -ms);
74
75
  }
75
76
 
76
77
  //
@@ -78,31 +79,31 @@ $experimental-support-for-khtml: false !default;
78
79
  // Creates a clip rect, including IE specific version.
79
80
  //
80
81
  @mixin clipped{
81
- @include clip(1px, 1px, 1px, 1px);
82
+ @include clip(1px, 1px, 1px, 1px);
82
83
  }
83
84
 
84
85
  @mixin clip($top: 1px, $right: 1px, $bottom: 1px, $left: 1px, $shape: rect, $abs: true){
85
- $shape:unquote($shape);
86
-
87
- clip: unquote("#{$shape}(#{$top}, #{$right}, #{$bottom}, #{$left})");
88
- @if $legacy-support-for-ie{
89
- clip: unquote("#{$shape}(#{$top} #{$right} #{$bottom} #{$left})"); // Stupid IE
90
- }
91
- @if $abs{ position: absolute; }
86
+ $shape:unquote($shape);
87
+
88
+ clip: unquote("#{$shape}(#{$top}, #{$right}, #{$bottom}, #{$left})");
89
+ @if $legacy-support-for-ie{
90
+ clip: unquote("#{$shape}(#{$top} #{$right} #{$bottom} #{$left})"); // Stupid IE
91
+ }
92
+ @if $abs{ position: absolute; }
92
93
  }
93
94
 
94
95
 
95
96
  // returns a contrasting version of a color based on luminance
96
97
  @function contrasting-color($color, $contrast: 100%) {
97
- @return if(lightness($color) > 50, darken($color, $contrast), lighten($color, $contrast));
98
+ @return if(lightness($color) > 50, darken($color, $contrast), lighten($color, $contrast));
98
99
  }
99
100
 
100
101
 
101
102
  // sets a contrasting text shadow based on $color
102
103
  @mixin bevel-text($color){
103
- $dark-shadow: rgba(0,0,0,.5) 0 -.08em 0;
104
- $light-shadow: rgba(255,255,255,.25) 0 .08em 0;
105
- text-shadow:if(luminance($color) == light, $dark-shadow, $light-shadow);
104
+ $dark-shadow: rgba(0,0,0,.5) 0 -.08em 0;
105
+ $light-shadow: rgba(255,255,255,.25) 0 .08em 0;
106
+ text-shadow:if(luminance($color) == light, $dark-shadow, $light-shadow);
106
107
  }
107
108
 
108
109
  // creates an empty psuedo element
@@ -0,0 +1,11 @@
1
+ @mixin larger-than($size:600px){
2
+ @media (min-width:$size){
3
+ @content;
4
+ }
5
+ }
6
+
7
+ @mixin smaller-than($size:590px){
8
+ @media (max-width:$size){
9
+ @content;
10
+ }
11
+ }
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facades
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
5
- prerelease:
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Brent Kirby
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-31 00:00:00.000000000 Z
11
+ date: 2013-11-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: sass
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,23 +27,20 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: compass
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.11.7
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 0.11.7
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: combustion
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,23 +55,20 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: 2.7.0
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: 2.7.0
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: sass-rails
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: webrat
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,17 +97,15 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: rspec-rails
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: 2.11.0
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: 2.11.0
126
111
  description: Facades is a collection of front-end patterns and libraries designed
@@ -184,8 +169,10 @@ files:
184
169
  - spec/unit/helpers/navigation_spec.rb
185
170
  - spec/unit/helpers/notifications_spec.rb
186
171
  - spec/unit/patterns/tabs_spec.rb
172
+ - src/icons/css/fa.css
187
173
  - src/icons/facades.yml
188
174
  - src/icons/font-awesome.yml
175
+ - src/icons/generator.rake
189
176
  - src/scss/facades/_buttons.scss
190
177
  - src/scss/facades/_config.scss
191
178
  - src/scss/facades/_debug.scss
@@ -206,6 +193,7 @@ files:
206
193
  - src/scss/facades/layout/_lists.scss
207
194
  - src/scss/facades/media/_video.scss
208
195
  - src/scss/facades/mixins/_gradients.scss
196
+ - src/scss/facades/mixins/_media.scss
209
197
  - src/scss/facades/mixins/_rhythm.scss
210
198
  - src/scss/facades/mobile/_buttons.scss
211
199
  - src/scss/facades/mobile/_config.scss
@@ -229,27 +217,26 @@ files:
229
217
  - src/scss/facades/typography/_tables.scss
230
218
  homepage: https://github.com/kurbmedia/facades
231
219
  licenses: []
220
+ metadata: {}
232
221
  post_install_message:
233
222
  rdoc_options: []
234
223
  require_paths:
235
224
  - lib
236
225
  required_ruby_version: !ruby/object:Gem::Requirement
237
- none: false
238
226
  requirements:
239
- - - ! '>='
227
+ - - '>='
240
228
  - !ruby/object:Gem::Version
241
229
  version: '0'
242
230
  required_rubygems_version: !ruby/object:Gem::Requirement
243
- none: false
244
231
  requirements:
245
- - - ! '>='
232
+ - - '>='
246
233
  - !ruby/object:Gem::Version
247
234
  version: '0'
248
235
  requirements: []
249
236
  rubyforge_project: facades
250
- rubygems_version: 1.8.23
237
+ rubygems_version: 2.0.3
251
238
  signing_key:
252
- specification_version: 3
239
+ specification_version: 4
253
240
  summary: Front-end development awesome-ness with Compass and Sass.
254
241
  test_files:
255
242
  - spec/internal/app/helpers/application_helper.rb