compass-fontcustom 1.0.0.pre3 → 1.0.0
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/CHANGELOG.md +8 -0
- data/README.md +10 -1
- data/compass-fontcustom.gemspec +2 -0
- data/lib/compass/fontcustom/templates/stylesheet.scss.erb +6 -0
- data/lib/compass/fontcustom/version.rb +1 -1
- data/test/unit/font_importer_test.rb +20 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a503c96a46269f387121518502e538e211077cf9
|
4
|
+
data.tar.gz: 76eec2fa2928c3da1f65dd2de53d962be18bef04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9a72d46c048d49a2367d352681216441043028770279f571f9c25034ba26cda5fefc60003c6b18eabbdc853033da4a1ee12fb03161d3f81052124fd3e6185d0
|
7
|
+
data.tar.gz: 6a509cec8776ce4592be0832c39c84a0ceba91a6e0b3ab9c7c98f4c5b6165da2169ebdee3e43ef00c5668c89fac15537c2eadd67600eaddbda90eabf3791c8aa
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
**1.0.0** Feature release
|
4
|
+
|
5
|
+
- Adding mixin for generating custom glyph classes
|
6
|
+
|
7
|
+
**1.0.0.pre3** Bugfix release
|
8
|
+
|
9
|
+
- Fixing CSS class <-> glyph mapping
|
10
|
+
|
3
11
|
**1.0.0.pre2** Maintenance release
|
4
12
|
|
5
13
|
- Depending on fontcustom 1.0.0.pre2
|
data/README.md
CHANGED
@@ -1,7 +1,16 @@
|
|
1
|
-
# Compass::Fontcustom
|
1
|
+
# Compass::Fontcustom
|
2
|
+
|
3
|
+
[](https://travis-ci.org/glaszig/compass-fontcustom)
|
4
|
+
[](http://badge.fury.io/rb/compass-fontcustom)
|
5
|
+
[](https://coveralls.io/r/glaszig/compass-fontcustom)
|
6
|
+
[](https://coderwall.com/glaszig)
|
2
7
|
|
3
8
|
This is my attempt of integrating [Font Custom](http://fontcustom.com) with [Compass](http://compass-style.org).
|
4
9
|
|
10
|
+
## Requirements
|
11
|
+
|
12
|
+
Made for ruby 1.9+. Tested on 1.9.3 and 2.0.0.
|
13
|
+
|
5
14
|
## Installation
|
6
15
|
|
7
16
|
Add this line to your application's Gemfile:
|
data/compass-fontcustom.gemspec
CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.required_ruby_version = '>= 1.9.3'
|
22
|
+
|
21
23
|
spec.add_dependency "compass"
|
22
24
|
spec.add_dependency "fontcustom", "~> 1.0.0"
|
23
25
|
|
@@ -12,3 +12,9 @@ $<%= name %>-glyphs: glyph-map("<%= uri %>");
|
|
12
12
|
@include fontcustom-font-face($<%= name %>-glyphs);
|
13
13
|
@include glyphs($<%= name %>-glyphs, <%= glyph_names.join " " %>, $<%= name %>-font-base-class)
|
14
14
|
}
|
15
|
+
|
16
|
+
@mixin <%= name %>-glyph($glyph-name) {
|
17
|
+
@extend #{$<%= name %>-font-base-class};
|
18
|
+
$index: index(<%= glyph_names.join " " %>, $glyph-name);
|
19
|
+
&:before { content: glyph($index); }
|
20
|
+
}
|
@@ -19,7 +19,7 @@ class FontImporterTest < Test::Unit::TestCase
|
|
19
19
|
Compass.add_configuration(config, "fontcustom_config")
|
20
20
|
|
21
21
|
Compass::Fontcustom::GlyphMap.configure do |config|
|
22
|
-
config.generator_options = { :debug =>
|
22
|
+
config.generator_options = { :debug => false }
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -71,4 +71,23 @@ class FontImporterTest < Test::Unit::TestCase
|
|
71
71
|
assert css =~ %r{.icon-#{fontname}-d}i, "icon d css class missing"
|
72
72
|
end
|
73
73
|
|
74
|
+
def test_glyph_mixin
|
75
|
+
fontname = 'myfont'
|
76
|
+
|
77
|
+
Compass.configuration.fontcustom_hash = false
|
78
|
+
|
79
|
+
css = render <<-SCSS
|
80
|
+
@import "#{fontname}/*.svg";
|
81
|
+
@include fontcustom-font-face($myfont-glyphs);
|
82
|
+
|
83
|
+
.custom-class-name {
|
84
|
+
@include myfont-glyph(C);
|
85
|
+
}
|
86
|
+
SCSS
|
87
|
+
|
88
|
+
assert css =~ %r{.#{fontname}-font, .custom-class-name}, "extending base class missing"
|
89
|
+
assert css =~ %r{@font-face}, "font-face definition missing"
|
90
|
+
assert css =~ %r{.custom-class-name:before}, "cusom class missing missing"
|
91
|
+
end
|
92
|
+
|
74
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass-fontcustom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glaszig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: compass
|
@@ -119,15 +119,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
119
|
requirements:
|
120
120
|
- - '>='
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
122
|
+
version: 1.9.3
|
123
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
|
-
- - '
|
125
|
+
- - '>='
|
126
126
|
- !ruby/object:Gem::Version
|
127
|
-
version:
|
127
|
+
version: '0'
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.0.
|
130
|
+
rubygems_version: 2.0.3
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: Integrates Fontcustom with Compass
|
@@ -138,4 +138,3 @@ test_files:
|
|
138
138
|
- test/test_helper.rb
|
139
139
|
- test/unit/font_importer_test.rb
|
140
140
|
- test/unit/glyph_map_test.rb
|
141
|
-
has_rdoc:
|