survivalkit 1.0.beta.13 → 1.0.beta.14

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.markdown CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.beta.14 - December 3, 2012
4
+ * font-face mixins now have an inline option
5
+
3
6
  ## 1.0.beta.13 - December 3, 2012
4
7
  * fix missing file
5
8
 
data/lib/survivalkit.rb CHANGED
@@ -8,7 +8,7 @@ Compass::Frameworks.register("survivalkit", :path => "#{File.dirname(__FILE__)}/
8
8
 
9
9
  module SurvivalKit
10
10
 
11
- VERSION = "1.0.beta.13"
11
+ VERSION = "1.0.beta.14"
12
12
  DATE = "2012-12-03"
13
13
 
14
14
  end
@@ -22,17 +22,30 @@
22
22
  ////////////////////////////
23
23
 
24
24
  @import "compass/css3/font-face";
25
-
26
- @mixin font-awesome-font-face {
27
- @include font-face(
28
- 'FontAwesome',
29
- font-files(
30
- "fontawesome-webfont.woff", woff,
31
- "fontawesome-webfont.ttf", truetype,
32
- "fontawesome-webfont.svg#FontAwesomeRegular", svg),
33
- 'fontawesome-webfont.eot',
34
- normal,
35
- normal);
25
+ $inline-fonts: false !default;
26
+
27
+ @mixin font-awesome-font-face() {
28
+ @if $inline-fonts == false {
29
+ @include font-face(
30
+ 'FontAwesome',
31
+ font-files(
32
+ "fontawesome-webfont.woff", woff,
33
+ "fontawesome-webfont.ttf", truetype,
34
+ "fontawesome-webfont.svg#FontAwesomeRegular", svg),
35
+ 'fontawesome-webfont.eot',
36
+ normal,
37
+ normal);
38
+ } @else {
39
+ @include font-face(
40
+ 'FontAwesome',
41
+ inline-font-files(
42
+ "fontawesome-webfont.woff", woff,
43
+ "fontawesome-webfont.ttf", truetype,
44
+ "fontawesome-webfont.svg", svg),
45
+ 'fontawesome-webfont.eot',
46
+ normal,
47
+ normal);
48
+ }
36
49
  }
37
50
 
38
51
  @mixin font-awesome {
@@ -1,8 +1,9 @@
1
1
  @import "compass/css3/font-face";
2
+ $inline-fonts: false !default;
2
3
 
3
4
  // available fonts:
4
5
  // all, regular, italic, condensed-regular, condensed-italic
5
- @mixin leaguegothic-font-face($fonts: all) {
6
+ @mixin league-gothic-font-face($fonts: all) {
6
7
  $all-fonts: regular, italic, condensed-regular, condensed-italic;
7
8
  @if $fonts == all {
8
9
  $fonts: $all-fonts;
@@ -18,16 +19,29 @@
18
19
  @if $font == condensed-italic {
19
20
  $style: italic;
20
21
  }
21
- @include font-face(
22
- 'League Gothic',
23
- font-files(
24
- "leaguegothic-#{$font}-webfont.woff", woff,
25
- "leaguegothic-#{$font}-webfont.ttf", truetype,
26
- "leaguegothic-#{$font}-webfont.svg#league_gothic#{$font}", svg
27
- ),
28
- 'leaguegothic-#{$font}-webfont.eot',
29
- $weight,
30
- $style);
22
+ @if $inline-fonts == false {
23
+ @include font-face(
24
+ 'League Gothic',
25
+ font-files(
26
+ "leaguegothic-#{$font}-webfont.woff", woff,
27
+ "leaguegothic-#{$font}-webfont.ttf", truetype,
28
+ "leaguegothic-#{$font}-webfont.svg#league_gothic#{$font}", svg
29
+ ),
30
+ 'leaguegothic-#{$font}-webfont.eot',
31
+ $weight,
32
+ $style);
33
+ } @else {
34
+ @include font-face(
35
+ 'League Gothic',
36
+ inline-font-files(
37
+ "leaguegothic-#{$font}-webfont.woff", woff,
38
+ "leaguegothic-#{$font}-webfont.ttf", truetype,
39
+ "leaguegothic-#{$font}-webfont.svg", svg
40
+ ),
41
+ 'leaguegothic-#{$font}-webfont.eot',
42
+ $weight,
43
+ $style);
44
+ }
31
45
  }
32
46
  }
33
47
  }
@@ -1,8 +1,9 @@
1
1
  @import "compass/css3/font-face";
2
+ $inline-fonts: false !default;
2
3
 
3
4
  // available fonts:
4
5
  // all, regular, light, bold, black
5
- @mixin ostrich-font-face($fonts: all) {
6
+ @mixin ostrich-sans-font-face($fonts: all) {
6
7
  $all-fonts: regular, light, bold, black;
7
8
  @if $fonts == all {
8
9
  $fonts: $all-fonts;
@@ -18,16 +19,30 @@
18
19
  @if $font == condensed-italic {
19
20
  $style: italic;
20
21
  }
21
- @include font-face(
22
- 'Ostrich',
23
- font-files(
24
- "ostrich-#{$font}-webfont.woff", woff,
25
- "ostrich-#{$font}-webfont.ttf", truetype,
26
- "ostrich-#{$font}-webfont.svg#ostrich#{$font}", svg
27
- ),
28
- 'ostrich-#{$font}-webfont.eot',
29
- $weight,
30
- $style);
22
+ @if $inline-fonts == false {
23
+ @include font-face(
24
+ 'Ostrich',
25
+ font-files(
26
+ "ostrich-#{$font}-webfont.woff", woff,
27
+ "ostrich-#{$font}-webfont.ttf", truetype,
28
+ "ostrich-#{$font}-webfont.svg#ostrich#{$font}", svg
29
+ ),
30
+ 'ostrich-#{$font}-webfont.eot',
31
+ $weight,
32
+ $style);
33
+ } @else {
34
+ @include font-face(
35
+ 'Ostrich',
36
+ inline-font-files(
37
+ "ostrich-#{$font}-webfont.woff", woff,
38
+ "ostrich-#{$font}-webfont.ttf", truetype,
39
+ "ostrich-#{$font}-webfont.svg", svg
40
+ ),
41
+ 'ostrich-#{$font}-webfont.eot',
42
+ $weight,
43
+ $style);
44
+
45
+ }
31
46
  }
32
47
  }
33
48
  }
@@ -35,28 +50,55 @@
35
50
 
36
51
  // dashed
37
52
  @mixin ostrich-dashed-font-face() {
38
- @include font-face(
39
- 'Ostrich Dashed',
40
- font-files(
41
- "ostrich-dashed-webfont.woff", woff,
42
- "ostrich-dashed-webfont.ttf", truetype,
43
- "ostrich-dashed-webfont.svg#ostrich-dashed", svg
44
- ),
45
- 'ostrich-dashed-webfont.eot',
46
- normal,
47
- normal);
53
+ @if $inline-fonts == false {
54
+ @include font-face(
55
+ 'Ostrich Dashed',
56
+ font-files(
57
+ "ostrich-dashed-webfont.woff", woff,
58
+ "ostrich-dashed-webfont.ttf", truetype,
59
+ "ostrich-dashed-webfont.svg#ostrich-dashed", svg
60
+ ),
61
+ 'ostrich-dashed-webfont.eot',
62
+ normal,
63
+ normal);
64
+ } @else {
65
+ @include font-face(
66
+ 'Ostrich Dashed',
67
+ inline-font-files(
68
+ "ostrich-dashed-webfont.woff", woff,
69
+ "ostrich-dashed-webfont.ttf", truetype,
70
+ "ostrich-dashed-webfont.svg", svg
71
+ ),
72
+ 'ostrich-dashed-webfont.eot',
73
+ normal,
74
+ normal);
75
+ }
48
76
  }
49
77
 
50
78
  // rounded
51
79
  @mixin ostrich-rounded-font-face() {
52
- @include font-face(
53
- 'Ostrich Rounded',
54
- font-files(
55
- "ostrich-rounded-webfont.woff", woff,
56
- "ostrich-rounded-webfont.ttf", truetype,
57
- "ostrich-rounded-webfont.svg#ostrich-rounded#", svg
58
- ),
59
- 'ostrich-rounded-webfont.eot',
60
- normal,
61
- normal);
80
+ @if $inline-fonts == false {
81
+ @include font-face(
82
+ 'Ostrich Rounded',
83
+ font-files(
84
+ "ostrich-rounded-webfont.woff", woff,
85
+ "ostrich-rounded-webfont.ttf", truetype,
86
+ "ostrich-rounded-webfont.svg#ostrich-rounded", svg
87
+ ),
88
+ 'ostrich-rounded-webfont.eot',
89
+ normal,
90
+ normal);
91
+ } @else {
92
+ @include font-face(
93
+ 'Ostrich Rounded',
94
+ inline-font-files(
95
+ "ostrich-rounded-webfont.woff", woff,
96
+ "ostrich-rounded-webfont.ttf", truetype,
97
+ "ostrich-rounded-webfont.svg", svg
98
+ ),
99
+ 'ostrich-rounded-webfont.eot',
100
+ normal,
101
+ normal);
102
+
103
+ }
62
104
  }
@@ -9,25 +9,49 @@
9
9
  // <link href="webfonts/ss-social.css" rel="stylesheet" />
10
10
 
11
11
  @import "compass/css3/font-face";
12
+ $inline-fonts: false !default;
12
13
 
13
- @include font-face(
14
- 'SSSocial',
15
- font-files(
16
- "ss-social-regular.woff", woff,
17
- "ss-social-regular.ttf", truetype,
18
- "ss-social-regular.svg#ss-social-regular", svg),
19
- 'ss-social-regular.eot',
20
- normal,
21
- normal);
22
- @include font-face(
23
- 'SSSocial',
24
- font-files(
25
- "ss-social-circle.woff", woff,
26
- "ss-social-circle.ttf", truetype,
27
- "ss-social-circle.svg#ss-social-circle", svg),
28
- 'ss-social-circle.eot',
29
- bold,
30
- normal);
14
+ @mixin ss-social-font-face() {
15
+ @if $inline-fonts == false {
16
+ @include font-face(
17
+ 'SSSocial',
18
+ font-files(
19
+ "ss-social-regular.woff", woff,
20
+ "ss-social-regular.ttf", truetype,
21
+ "ss-social-regular.svg#ss-social-regular", svg),
22
+ 'ss-social-regular.eot',
23
+ normal,
24
+ normal);
25
+ @include font-face(
26
+ 'SSSocial',
27
+ font-files(
28
+ "ss-social-circle.woff", woff,
29
+ "ss-social-circle.ttf", truetype,
30
+ "ss-social-circle.svg#ss-social-circle", svg),
31
+ 'ss-social-circle.eot',
32
+ bold,
33
+ normal);
34
+ } @else {
35
+ @include font-face(
36
+ 'SSSocial',
37
+ inline-font-files(
38
+ "ss-social-regular.woff", woff,
39
+ "ss-social-regular.ttf", ttf,
40
+ "ss-social-regular.svg", svg),
41
+ 'ss-social-regular.eot',
42
+ normal,
43
+ normal);
44
+ @include font-face(
45
+ 'SSSocial',
46
+ inline-font-files(
47
+ "ss-social-circle.woff", woff,
48
+ "ss-social-circle.ttf", ttf,
49
+ "ss-social-circle.svg", svg),
50
+ 'ss-social-circle.eot',
51
+ bold,
52
+ normal);
53
+ }
54
+ }
31
55
 
32
56
  @mixin ss-social-classes {
33
57
  /* This triggers a redraw in IE to Fix IE8's :before content rendering. */
@@ -9,16 +9,33 @@
9
9
  // <link href="webfonts/ss-standard.css" rel="stylesheet" />
10
10
 
11
11
  @import "compass/css3/font-face";
12
+ $inline-fonts: false !default;
13
+
14
+ @mixin ss-standard-font-face() {
15
+ @if $inline-fonts == false {
16
+ @include font-face(
17
+ 'SSStandard',
18
+ font-files(
19
+ "ss-standard.woff", woff,
20
+ "ss-standard.ttf", truetype,
21
+ "ss-standard.svg#ss-standard", svg),
22
+ 'ss-standard.eot',
23
+ normal,
24
+ normal);
25
+ } @else if $inline-fonts == true {
26
+ @include font-face(
27
+ 'SSStandard',
28
+ inline-font-files(
29
+ "ss-standard.woff", woff,
30
+ "ss-standard.ttf", truetype,
31
+ "ss-standard.svg", svg),
32
+ 'ss-standard.eot',
33
+ normal,
34
+ normal);
35
+ }
36
+ }
37
+
12
38
 
13
- @include font-face(
14
- 'SSStandard',
15
- font-files(
16
- "ss-standard.woff", woff,
17
- "ss-standard.ttf", truetype,
18
- "ss-standard.svg#ss-standard", svg),
19
- 'ss-standard.eot',
20
- normal,
21
- normal);
22
39
 
23
40
 
24
41
  @mixin ss-standard-classes {
@@ -32,12 +32,16 @@ $font-cap: $font-sans;
32
32
  // 'bold',
33
33
  // 'normal');
34
34
 
35
+ // Encode custom fonts in the compiled css (data uri)
36
+ $inline-fonts: false;
37
+
35
38
  ////////////////////////////
36
39
  // FONT-AWESOME
37
40
  // uncomment to include
38
41
  // http://fortawesome.github.com/Font-Awesome/
39
42
  ////////////////////////////
40
43
  // @import 'survivalkit/fonts/font-awesome';
44
+ // @include font-awesome-font-face;
41
45
 
42
46
  ////////////////////////////
43
47
  // SYMBOLSET - STANDARD
@@ -47,6 +51,7 @@ $font-cap: $font-sans;
47
51
  // purchase the font and place in your fonts directory
48
52
  ////////////////////////////
49
53
  // @import 'survivalkit/fonts/ss-standard';
54
+ // @include ss-standard-font-face;
50
55
  // @include ss-standard-classes;
51
56
 
52
57
  ////////////////////////////
@@ -57,6 +62,7 @@ $font-cap: $font-sans;
57
62
  // purchase the font and place in your fonts directory
58
63
  ////////////////////////////
59
64
  // @import 'survivalkit/fonts/ss-social';
65
+ // @include ss-social-font-face;
60
66
  // @include ss-social-classes;
61
67
 
62
68
  ////////////////////////////
@@ -65,6 +71,7 @@ $font-cap: $font-sans;
65
71
  // http://www.theleagueofmoveabletype.com/league-gothic
66
72
  ////////////////////////////
67
73
  // @import 'survivalkit/fonts/league-gothic';
74
+ // @include league-gothic-font-face;
68
75
 
69
76
  ////////////////////////////
70
77
  // OSTRICH SANS
@@ -72,3 +79,6 @@ $font-cap: $font-sans;
72
79
  // http://www.theleagueofmoveabletype.com/ostrich-sans
73
80
  ////////////////////////////
74
81
  // @import 'survivalkit/fonts/ostrich-sans';
82
+ // @include ostrich-sans-font-face;
83
+ // @include ostrich-dashed-font-face;
84
+ // @include ostrich-rounded-font-face;
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 1
7
7
  - 0
8
8
  - beta
9
- - 13
10
- version: 1.0.beta.13
9
+ - 14
10
+ version: 1.0.beta.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mason Wendell