Skip to content

Commit 6634d0a

Browse files
committed
Remove compass support
1 parent 489b6f2 commit 6634d0a

12 files changed

+234
-388
lines changed

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
dist: xenial
12
language: ruby
23
cache: bundler
34
bundler_args: --path ../../vendor/bundle --without debug
45
rvm:
5-
- 2.2.3
6+
- 2.5.1
67
gemfile:
7-
- test/gemfiles/sass_3_3.gemfile
8-
- test/gemfiles/sass_3_4.gemfile
8+
- test/gemfiles/default.gemfile
99
before_install:
1010
- "nvm install stable"
1111
- "npm install"

Gemfile

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ source 'https://rubygems.org'
22

33
gemspec
44

5-
# Compass for the dummy app
6-
gem 'compass', require: false
7-
85
group :development do
96
gem 'byebug', platform: :mri, require: false
107
end

README.md

+7-50
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ This is Bootstrap **3**. For Bootstrap **4** use the [Bootstrap rubygem](https:/
1313
Please see the appropriate guide for your environment of choice:
1414

1515
* [Ruby on Rails](#a-ruby-on-rails).
16-
* [Compass](#b-compass-without-rails) not on Rails.
17-
* [Bower](#c-bower).
18-
* [npm / Node.js](#d-npm--nodejs).
16+
* [Bower](#b-bower).
17+
* [npm / Node.js](#c-npm--nodejs).
1918

2019
### a. Ruby on Rails
2120

@@ -25,7 +24,7 @@ In your Gemfile you need to add the `bootstrap-sass` gem, and ensure that the `s
2524

2625
```ruby
2726
gem 'bootstrap-sass', '~> 3.3.7'
28-
gem 'sass-rails', '>= 3.2'
27+
gem 'sassc-rails', '>= 1.3.0'
2928
```
3029

3130
`bundle install` and restart your server to make the files available through the pipeline.
@@ -112,49 +111,7 @@ Please make sure `sprockets-rails` is at least v2.1.4.
112111

113112
bootstrap-sass is no longer compatible with Rails 3. The latest version of bootstrap-sass compatible with Rails 3.2 is v3.1.1.0.
114113

115-
### b. Compass without Rails
116-
117-
Install the gem:
118-
119-
```console
120-
$ gem install bootstrap-sass
121-
```
122-
123-
If you have an existing Compass project:
124-
125-
1. Require `bootstrap-sass` in `config.rb`:
126-
127-
```ruby
128-
require 'bootstrap-sass'
129-
```
130-
131-
2. Install Bootstrap with:
132-
133-
```console
134-
$ bundle exec compass install bootstrap -r bootstrap-sass
135-
```
136-
137-
If you are creating a new Compass project, you can generate it with bootstrap-sass support:
138-
139-
```console
140-
$ bundle exec compass create my-new-project -r bootstrap-sass --using bootstrap
141-
```
142-
143-
or, alternatively, if you're not using a Gemfile for your dependencies:
144-
145-
```console
146-
$ compass create my-new-project -r bootstrap-sass --using bootstrap
147-
```
148-
149-
This will create a new Compass project with the following files in it:
150-
151-
* [styles.sass](/templates/project/styles.sass) - main project Sass file, imports Bootstrap and variables.
152-
* [_bootstrap-variables.sass](/templates/project/_bootstrap-variables.sass) - all of Bootstrap variables, override them here.
153-
154-
Some bootstrap-sass mixins may conflict with the Compass ones.
155-
If this happens, change the import order so that Compass mixins are loaded later.
156-
157-
### c. Bower
114+
### b. Bower
158115

159116
bootstrap-sass Bower package is compatible with node-sass 3.2.0+. You can install it with:
160117

@@ -187,7 +144,7 @@ In `application.js`:
187144

188145
See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for mincer.
189146

190-
### d. npm / Node.js
147+
### c. npm / Node.js
191148
```console
192149
$ npm install bootstrap-sass
193150
```
@@ -212,8 +169,8 @@ In the application Sass file, replace `@import 'bootstrap'` with:
212169

213170
bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 8 (default is 5).
214171

215-
Precision is set for Rails and Compass automatically.
216-
When using Ruby Sass compiler standalone or with the Bower version you can set it with:
172+
Precision is set for Ruby automatically when using the `sassc-rails` gem.
173+
When using the npm or Bower version with Ruby, you can set it with:
217174

218175
```ruby
219176
::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max

lib/bootstrap-sass.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ def load!
1414
elsif defined?(::Sass) && ::Sass.respond_to?(:load_paths)
1515
# The deprecated `sass` gem:
1616
::Sass.load_paths << stylesheets_path
17+
end
18+
19+
if defined?(::Sass::Script::Value::Number)
1720
# bootstrap requires minimum precision of 8, see https://github.com/twbs/bootstrap-sass/issues/409
18-
::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
21+
::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
1922
end
2023
end
2124

0 commit comments

Comments
 (0)