turbosass 0.1.0 → 0.2.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.
- data/CHANGELOG.markdown +10 -0
- data/README.markdown +12 -2
- data/lib/turbosass.rb +17 -7
- data/lib/turbosass/scss/turbosass/_fonts.scss +5 -4
- data/lib/turbosass/version.rb +1 -1
- metadata +6 -5
data/CHANGELOG.markdown
ADDED
data/README.markdown
CHANGED
@@ -8,7 +8,7 @@ The mixins are divided in the following categories:
|
|
8
8
|
|
9
9
|
* A grid system loosely based on 960.gs but using a configurable gutter width, amount of columns and column width.
|
10
10
|
|
11
|
-
* A web font wrapper.
|
11
|
+
* A web font wrapper using the bulletproof font syntax.
|
12
12
|
|
13
13
|
* The HTML5 Boilerplate reset CSS.
|
14
14
|
|
@@ -24,11 +24,21 @@ and then you're ready to go.
|
|
24
24
|
|
25
25
|
# Usage
|
26
26
|
|
27
|
+
## Rails 3
|
28
|
+
|
29
|
+
To use TurboSass in Rails 3 all you have to do is add the following line to your Gemfile:
|
30
|
+
|
31
|
+
gem 'turbosass', '>= 0.2.0'
|
32
|
+
|
33
|
+
To make TurboSass work correctly you have to comment out the `haml` gem in your Gemfile. TurboSass automatically loads it for you.
|
34
|
+
|
35
|
+
If you want to make use of other gems that utilize either Haml or Sass (such as `haml-rails`) you have to add these gems after the TurboSass gem definition.
|
36
|
+
|
27
37
|
## Sinatra
|
28
38
|
|
29
39
|
TurboSass was built mainly for use in Sinatra applications, so using it here is really simple.
|
30
40
|
|
31
|
-
All you have to do is `require "turbosass"` in either your `config.ru` file or your main application file. Then you can use `@import "turbosass";` in any SCSS file where you want to use TurboSass.
|
41
|
+
All you have to do is `require "turbosass"` in either your `config.ru` file or your main application file. Then you can use `@import "turbosass";` in any SCSS file where you want to use TurboSass.
|
32
42
|
|
33
43
|
See the `examples/sinatra` directory for a fully working example.
|
34
44
|
|
data/lib/turbosass.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
require "
|
1
|
+
if defined? Rails
|
2
|
+
require "haml"
|
3
|
+
else
|
4
|
+
require "sass"
|
5
|
+
require "sass/plugin"
|
6
|
+
end
|
3
7
|
|
4
8
|
module TurboSass
|
5
9
|
def self.path
|
@@ -8,11 +12,17 @@ module TurboSass
|
|
8
12
|
end
|
9
13
|
|
10
14
|
module Sass
|
11
|
-
|
12
|
-
|
13
|
-
|
15
|
+
if defined? Engine
|
16
|
+
class Engine
|
17
|
+
new_default_options = DEFAULT_OPTIONS.clone
|
18
|
+
new_default_options[:load_paths] << ::TurboSass.path
|
14
19
|
|
15
|
-
|
16
|
-
|
20
|
+
remove_const(:DEFAULT_OPTIONS)
|
21
|
+
DEFAULT_OPTIONS = new_default_options.freeze
|
22
|
+
end
|
23
|
+
elsif defined? Plugin
|
24
|
+
module Plugin
|
25
|
+
@options[:load_paths] = [::TurboSass.path]
|
26
|
+
end
|
17
27
|
end
|
18
28
|
end
|
@@ -12,9 +12,10 @@ $fontpath: "/fonts" !default;
|
|
12
12
|
@mixin webfont($family, $filename) {
|
13
13
|
@font-face {
|
14
14
|
font-family: '#{$family}';
|
15
|
-
src: url('#{$fontpath}/#{$filename}.eot');
|
16
|
-
src:
|
17
|
-
|
18
|
-
|
15
|
+
src: url('#{$fontpath}/#{$filename}.eot'); // IE9 Compat Modes
|
16
|
+
src: url('#{$fontpath}/#{$filename}.eot?iefix') format('eot'), // IE6-IE8
|
17
|
+
url('#{$fontpath}/#{$filename}.woff') format('woff'), // Modern Browsers
|
18
|
+
url('#{$fontpath}/#{$filename}.ttf') format('truetype'), // Safari, Android, iOS
|
19
|
+
url('#{$fontpath}/#{$filename}.svg#svgFontName') format('svg'); // Legacy iOS
|
19
20
|
}
|
20
21
|
}
|
data/lib/turbosass/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbosass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Emil Loer
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-12 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -45,6 +45,7 @@ extra_rdoc_files: []
|
|
45
45
|
|
46
46
|
files:
|
47
47
|
- .gitignore
|
48
|
+
- CHANGELOG.markdown
|
48
49
|
- Gemfile
|
49
50
|
- README.markdown
|
50
51
|
- Rakefile
|
@@ -94,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
95
|
requirements: []
|
95
96
|
|
96
97
|
rubyforge_project: turbosass
|
97
|
-
rubygems_version: 1.
|
98
|
+
rubygems_version: 1.5.2
|
98
99
|
signing_key:
|
99
100
|
specification_version: 3
|
100
101
|
summary: Sass framework for ninjas
|