graphite-sass 0.5.0 → 0.5.1
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.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/lib/graphite.rb +0 -10
- data/lib/graphite/importer.rb +7 -7
- data/lib/graphite/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f83a2c263986ff2a7713352ae9ff8da343ffd401
|
|
4
|
+
data.tar.gz: 53a308a5ba232df2e0ea833bd3ab3f6fc73e1f96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c27b66d8cb9175a74e9172cd026b7950ac1fb2e645af364b5d7e90673231c06326f6b26b7ef15600ec43080904e35186d512509ec5b73a97b00381a68dc8cbf1
|
|
7
|
+
data.tar.gz: bda13e55849cbe21ae7fea791624266d9bd0e3ea1e53a84b33546337f4ffaad76795b5e7f998f202ff9c3489b575b4a2cfd7018c05a6a90126eb5c6f90b9edad
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Graphite allows you to import fonts into your stylesheet in a syntax similar to
|
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
7
|
-
* Sass `~> 3.
|
|
7
|
+
* Sass `~> 3.3.0` _(have not tested earlier versions)_
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -39,7 +39,7 @@ In order for Graphite to successfully import your fonts, please follow this conv
|
|
|
39
39
|
|
|
40
40
|
> ###### name: \<string\>
|
|
41
41
|
> ###### weight: \<100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900\>
|
|
42
|
-
> ###### style: \<normal | italic\> (defaults to normal if blank)
|
|
42
|
+
> ###### style: \<normal | italic | oblique\> (defaults to normal if blank)
|
|
43
43
|
> ###### extension: \<woff | woff2 | ttf | eot | svg | otf\>
|
|
44
44
|
|
|
45
45
|
#### name-weight-style.extension
|
|
@@ -63,32 +63,32 @@ The output is similar to what Google Fonts does with their CSS. All fonts share
|
|
|
63
63
|
font-family: "lato";
|
|
64
64
|
font-weight: 200;
|
|
65
65
|
font-style: normal;
|
|
66
|
-
src: url("fonts/lato/lato-200.ttf") format("truetype");
|
|
66
|
+
src: url("../fonts/lato/lato-200.ttf") format("truetype");
|
|
67
67
|
}
|
|
68
68
|
@font-face {
|
|
69
69
|
font-family: "lato";
|
|
70
70
|
font-weight: 700;
|
|
71
71
|
font-style: normal;
|
|
72
|
-
src: url("fonts/lato/lato-700.ttf") format("truetype");
|
|
72
|
+
src: url("../fonts/lato/lato-700.ttf") format("truetype");
|
|
73
73
|
}
|
|
74
74
|
@font-face {
|
|
75
75
|
font-family: "lato";
|
|
76
76
|
font-weight: 200;
|
|
77
77
|
font-style: italic;
|
|
78
|
-
src: url("fonts/lato/lato-200-italic.ttf") format("truetype");
|
|
78
|
+
src: url("../fonts/lato/lato-200-italic.ttf") format("truetype");
|
|
79
79
|
}
|
|
80
80
|
@font-face {
|
|
81
81
|
font-family: "lato";
|
|
82
82
|
font-weight: 700;
|
|
83
83
|
font-style: italic;
|
|
84
|
-
src: url("fonts/lato/lato-700-italic.ttf") format("truetype");
|
|
84
|
+
src: url("../fonts/lato/lato-700-italic.ttf") format("truetype");
|
|
85
85
|
}
|
|
86
86
|
@font-face {
|
|
87
87
|
font-family: "helvetica-neue";
|
|
88
88
|
font-weight: 500;
|
|
89
89
|
font-style: normal;
|
|
90
|
-
src: url("fonts/helvetica-neue/helvetica-neue-500.eot");
|
|
91
|
-
src: url("fonts/helvetica-neue/helvetica-neue-500.eot?#iefix") format("embedded-opentype"), url("fonts/helvetica-neue/helvetica-neue-500.woff") format("woff"), url("fonts/helvetica-neue/helvetica-neue-500.ttf") format("truetype"), url("fonts/helvetica-neue/helvetica-neue-500.svg#helvetica-neue") format("svg");
|
|
90
|
+
src: url("../fonts/helvetica-neue/helvetica-neue-500.eot");
|
|
91
|
+
src: url("../fonts/helvetica-neue/helvetica-neue-500.eot?#iefix") format("embedded-opentype"), url("fonts/helvetica-neue/helvetica-neue-500.woff") format("woff"), url("fonts/helvetica-neue/helvetica-neue-500.ttf") format("truetype"), url("fonts/helvetica-neue/helvetica-neue-500.svg#helvetica-neue") format("svg");
|
|
92
92
|
}
|
|
93
93
|
```
|
|
94
94
|
|
data/lib/graphite.rb
CHANGED
|
@@ -3,15 +3,5 @@ require_relative "graphite/version"
|
|
|
3
3
|
require_relative "graphite/importer"
|
|
4
4
|
require_relative "graphite/monkeypatch"
|
|
5
5
|
|
|
6
|
-
base_directory = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
|
7
|
-
graphite_stylesheets_path = File.join(base_directory, 'stylesheets')
|
|
8
|
-
|
|
9
|
-
if (defined? Compass)
|
|
10
|
-
Compass::Frameworks.register('graphite', :path => base_directory)
|
|
11
|
-
else
|
|
12
|
-
ENV["SASS_PATH"] = [ENV["SASS_PATH"], graphite_stylesheets_path].compact.join(File::PATH_SEPARATOR)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
6
|
module Graphite
|
|
16
|
-
Sass::Script::Functions.send(:include, Graphite)
|
|
17
7
|
end
|
data/lib/graphite/importer.rb
CHANGED
|
@@ -164,7 +164,7 @@ module Graphite
|
|
|
164
164
|
|
|
165
165
|
# Include this for IE9
|
|
166
166
|
if atts["extensions"].include? "eot"
|
|
167
|
-
content += "\tsrc: url('
|
|
167
|
+
content += "\tsrc: url('../#{atts["path"]}.eot');\n"
|
|
168
168
|
end
|
|
169
169
|
|
|
170
170
|
# Create array of src urls
|
|
@@ -172,22 +172,22 @@ module Graphite
|
|
|
172
172
|
|
|
173
173
|
# Push extensions to src arr if match
|
|
174
174
|
if atts["extensions"].include? "eot"
|
|
175
|
-
src << "url('
|
|
175
|
+
src << "url('../#{atts["path"]}.eot?#iefix') format('embedded-opentype')"
|
|
176
176
|
end
|
|
177
177
|
if atts["extensions"].include? "woff2"
|
|
178
|
-
src << "url('
|
|
178
|
+
src << "url('../#{atts["path"]}.woff2') format('woff2')"
|
|
179
179
|
end
|
|
180
180
|
if atts["extensions"].include? "woff"
|
|
181
|
-
src << "url('
|
|
181
|
+
src << "url('../#{atts["path"]}.woff') format('woff')"
|
|
182
182
|
end
|
|
183
183
|
if atts["extensions"].include? "otf"
|
|
184
|
-
src << "url('
|
|
184
|
+
src << "url('../#{atts["path"]}.otf') format('opentype')"
|
|
185
185
|
end
|
|
186
186
|
if atts["extensions"].include? "ttf"
|
|
187
|
-
src << "url('
|
|
187
|
+
src << "url('../#{atts["path"]}.ttf') format('truetype')"
|
|
188
188
|
end
|
|
189
189
|
if atts["extensions"].include? "svg"
|
|
190
|
-
src << "url('
|
|
190
|
+
src << "url('../#{atts["path"]}.svg##{font}') format('svg')"
|
|
191
191
|
end
|
|
192
192
|
|
|
193
193
|
# Join src together
|
data/lib/graphite/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: graphite-sass
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ezekiel Gabrielse
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '>='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.
|
|
19
|
+
version: 3.3.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '>='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.
|
|
26
|
+
version: 3.3.0
|
|
27
27
|
description: Graphite allows you to import fonts into your stylesheet in a syntax
|
|
28
28
|
similar to Google Fonts. Quick and simple.
|
|
29
29
|
email:
|