bootstrap-sass 3.0.2.0 → 3.0.2.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.
Potentially problematic release.
This version of bootstrap-sass might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +10 -13
- data/lib/bootstrap-sass.rb +14 -5
- data/lib/bootstrap-sass/version.rb +1 -1
- data/templates/project/manifest.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7adbd7c5c49bbaf3ac3ca916dca5a5c5fcfbdd32
|
4
|
+
data.tar.gz: 98f8ed3a12d41e396130826cd46bd4b3bcfa8089
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af547f0a32aef0187ddd596aa6ff90574994339b444b3f11da80e8ac4e0b35bf6dccf84974ee7a06c124c0accfad0338d4334f6772adc91e64fd56ad86195be7
|
7
|
+
data.tar.gz: 64d7cfa04ca0050be992dda8541a884caa5c3dd2b3ee59a337cb078a75955b729743d4c1f2169a4b0470fafe191b482a27d000178b915323733e618de2e46e81
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[](http://travis-ci.org/thomas-mcdonald/bootstrap-sass) [](https://codeclimate.com/github/thomas-mcdonald/bootstrap-sass)
|
4
4
|
|
5
|
-
`bootstrap-sass` is
|
5
|
+
`bootstrap-sass` is a Sass-powered version of [Bootstrap](http://github.com/twbs/bootstrap), ready to drop right into your Sass powered applications.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -16,7 +16,7 @@ In your Gemfile you need to add the `bootstrap-sass` gem, and ensure that the `s
|
|
16
16
|
|
17
17
|
```ruby
|
18
18
|
gem 'sass-rails', '>= 3.2' # sass-rails needs to be higher than 3.2
|
19
|
-
gem 'bootstrap-sass', '~> 3.0.
|
19
|
+
gem 'bootstrap-sass', '~> 3.0.2.0'
|
20
20
|
```
|
21
21
|
|
22
22
|
`bundle install` and restart your server to make the files available through the pipeline.
|
@@ -24,8 +24,8 @@ gem 'bootstrap-sass', '~> 3.0.1.0.rc'
|
|
24
24
|
### b. Compass (no Rails)
|
25
25
|
|
26
26
|
Install the gem
|
27
|
-
```
|
28
|
-
gem install bootstrap-sass
|
27
|
+
```sh
|
28
|
+
gem install bootstrap-sass
|
29
29
|
```
|
30
30
|
|
31
31
|
If you have an existing Compass project:
|
@@ -53,9 +53,10 @@ This will create a new Compass project with the following files in it:
|
|
53
53
|
|
54
54
|
## Usage
|
55
55
|
|
56
|
-
###
|
56
|
+
### Sass
|
57
57
|
|
58
|
-
Import Bootstrap
|
58
|
+
Import Bootstrap into a Sass file (for example, `application.css.scss`) to get all of Bootstrap's styles, mixins and variables!
|
59
|
+
We recommend against using `//= require` directives, since none of your other stylesheets will be [able to access][antirequire] the Bootstrap mixins or variables.
|
59
60
|
|
60
61
|
```scss
|
61
62
|
@import "bootstrap";
|
@@ -77,24 +78,20 @@ $navbar-default-color: $light-orange;
|
|
77
78
|
@import "bootstrap";
|
78
79
|
```
|
79
80
|
|
80
|
-
|
81
|
-
|
82
|
-
Copy `bootstrap.scss` from the gem into the project's vendor/ as `bootstrap-custom.scss`.
|
81
|
+
You can also import components explicitly. To start with a full list of modules copy this file from the gem:
|
83
82
|
|
84
83
|
```bash
|
85
84
|
cp $(bundle show bootstrap-sass)/vendor/assets/stylesheets/bootstrap/bootstrap.scss \
|
86
85
|
vendor/assets/stylesheets/bootstrap-custom.scss
|
87
86
|
```
|
88
87
|
|
89
|
-
|
90
|
-
|
91
|
-
Finally, in your `application.sass`:
|
88
|
+
In your `application.sass`, replace `@import 'bootstrap'` with:
|
92
89
|
|
93
90
|
```scss
|
94
91
|
@import 'bootstrap-custom';
|
95
92
|
```
|
96
93
|
|
97
|
-
|
94
|
+
Comment out any modules you don't need from `bootstrap-custom`.
|
98
95
|
|
99
96
|
### Javascript
|
100
97
|
|
data/lib/bootstrap-sass.rb
CHANGED
@@ -20,7 +20,7 @@ module Bootstrap
|
|
20
20
|
'bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded'
|
21
21
|
end
|
22
22
|
|
23
|
-
bs_stylesheets = File.
|
23
|
+
bs_stylesheets = File.join(gem_path, 'vendor', 'assets', 'stylesheets')
|
24
24
|
::Sass.load_paths << bs_stylesheets
|
25
25
|
if ::Sass::Script::Number.precision < 10
|
26
26
|
# see https://github.com/thomas-mcdonald/bootstrap-sass/issues/409
|
@@ -29,6 +29,11 @@ module Bootstrap
|
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
32
|
+
|
33
|
+
def self.gem_path
|
34
|
+
@gem_path ||= File.expand_path File.join('..'), File.dirname(__FILE__)
|
35
|
+
end
|
36
|
+
|
32
37
|
def self.asset_pipeline?
|
33
38
|
defined?(::Sprockets)
|
34
39
|
end
|
@@ -42,10 +47,14 @@ module Bootstrap
|
|
42
47
|
end
|
43
48
|
|
44
49
|
def self.register_compass_extension
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
50
|
+
styles = File.join gem_path, 'vendor', 'assets', 'stylesheets'
|
51
|
+
templates = File.join gem_path, 'templates'
|
52
|
+
::Compass::Frameworks.register(
|
53
|
+
'bootstrap',
|
54
|
+
:path => gem_path,
|
55
|
+
:stylesheets_directory => styles,
|
56
|
+
:templates_directory => templates
|
57
|
+
)
|
49
58
|
end
|
50
59
|
|
51
60
|
def self.register_rails_engine
|
@@ -5,12 +5,12 @@ stylesheet 'styles.scss'
|
|
5
5
|
|
6
6
|
# SCSS:
|
7
7
|
bs_stylesheets = "../../vendor/assets/stylesheets/bootstrap"
|
8
|
-
stylesheet '_variables.scss.erb', to
|
9
|
-
bs_variables_path
|
8
|
+
stylesheet '_variables.scss.erb', :to => '_variables.scss', :erb => true,
|
9
|
+
:bs_variables_path => File.expand_path("#{bs_stylesheets}/_variables.scss", File.dirname(__FILE__))
|
10
10
|
|
11
11
|
# JS:
|
12
12
|
bs_javascripts = "../../vendor/assets/javascripts/bootstrap"
|
13
13
|
Dir.glob File.expand_path("#{bs_javascripts}/*.js", File.dirname(__FILE__)) do |path|
|
14
14
|
file = File.basename(path)
|
15
|
-
javascript "#{bs_javascripts}/#{file}", to
|
15
|
+
javascript "#{bs_javascripts}/#{file}", :to => "bootstrap/#{file}"
|
16
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.2.
|
4
|
+
version: 3.0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas McDonald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: compass
|