bootstrap-sass 3.3.4.1 → 3.4.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.
Files changed (118) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.travis.yml +8 -12
  4. data/CHANGELOG.md +26 -0
  5. data/Gemfile +1 -4
  6. data/LICENSE +2 -1
  7. data/README.md +80 -74
  8. data/Rakefile +46 -11
  9. data/assets/javascripts/bootstrap.js +441 -178
  10. data/assets/javascripts/bootstrap.min.js +4 -5
  11. data/assets/javascripts/bootstrap/affix.js +8 -6
  12. data/assets/javascripts/bootstrap/alert.js +6 -5
  13. data/assets/javascripts/bootstrap/button.js +24 -15
  14. data/assets/javascripts/bootstrap/carousel.js +16 -7
  15. data/assets/javascripts/bootstrap/collapse.js +7 -6
  16. data/assets/javascripts/bootstrap/dropdown.js +49 -45
  17. data/assets/javascripts/bootstrap/modal.js +47 -28
  18. data/assets/javascripts/bootstrap/popover.js +25 -10
  19. data/assets/javascripts/bootstrap/scrollspy.js +4 -4
  20. data/assets/javascripts/bootstrap/tab.js +13 -11
  21. data/assets/javascripts/bootstrap/tooltip.js +232 -31
  22. data/assets/javascripts/bootstrap/transition.js +5 -5
  23. data/assets/stylesheets/_bootstrap-mincer.scss +2 -2
  24. data/assets/stylesheets/_bootstrap.scss +6 -0
  25. data/assets/stylesheets/bootstrap/_alerts.scss +3 -3
  26. data/assets/stylesheets/bootstrap/_badges.scss +3 -3
  27. data/assets/stylesheets/bootstrap/_breadcrumbs.scss +3 -1
  28. data/assets/stylesheets/bootstrap/_button-groups.scss +9 -8
  29. data/assets/stylesheets/bootstrap/_buttons.scss +17 -9
  30. data/assets/stylesheets/bootstrap/_carousel.scss +34 -32
  31. data/assets/stylesheets/bootstrap/_close.scss +1 -0
  32. data/assets/stylesheets/bootstrap/_code.scss +3 -3
  33. data/assets/stylesheets/bootstrap/_component-animations.scss +1 -0
  34. data/assets/stylesheets/bootstrap/_dropdowns.scss +22 -23
  35. data/assets/stylesheets/bootstrap/_forms.scss +101 -72
  36. data/assets/stylesheets/bootstrap/_glyphicons.scss +15 -13
  37. data/assets/stylesheets/bootstrap/_grid.scss +10 -0
  38. data/assets/stylesheets/bootstrap/_input-groups.scss +10 -5
  39. data/assets/stylesheets/bootstrap/_jumbotron.scss +8 -4
  40. data/assets/stylesheets/bootstrap/_labels.scss +1 -1
  41. data/assets/stylesheets/bootstrap/_list-group.scss +30 -26
  42. data/assets/stylesheets/bootstrap/_media.scss +6 -1
  43. data/assets/stylesheets/bootstrap/_mixins.scss +1 -0
  44. data/assets/stylesheets/bootstrap/_modals.scss +8 -8
  45. data/assets/stylesheets/bootstrap/_navbar.scss +75 -81
  46. data/assets/stylesheets/bootstrap/_navs.scss +4 -4
  47. data/assets/stylesheets/bootstrap/_normalize.scss +13 -13
  48. data/assets/stylesheets/bootstrap/_pager.scss +2 -2
  49. data/assets/stylesheets/bootstrap/_pagination.scss +15 -17
  50. data/assets/stylesheets/bootstrap/_panels.scss +11 -5
  51. data/assets/stylesheets/bootstrap/_popovers.scss +50 -59
  52. data/assets/stylesheets/bootstrap/_print.scss +90 -98
  53. data/assets/stylesheets/bootstrap/_progress-bars.scss +3 -3
  54. data/assets/stylesheets/bootstrap/_responsive-embed.scss +2 -2
  55. data/assets/stylesheets/bootstrap/_responsive-utilities.scss +7 -5
  56. data/assets/stylesheets/bootstrap/_scaffolding.scss +8 -9
  57. data/assets/stylesheets/bootstrap/_tables.scss +23 -23
  58. data/assets/stylesheets/bootstrap/_theme.scss +42 -20
  59. data/assets/stylesheets/bootstrap/_thumbnails.scss +1 -1
  60. data/assets/stylesheets/bootstrap/_tooltip.scss +42 -32
  61. data/assets/stylesheets/bootstrap/_type.scss +11 -11
  62. data/assets/stylesheets/bootstrap/_variables.scss +16 -8
  63. data/assets/stylesheets/bootstrap/_wells.scss +2 -2
  64. data/assets/stylesheets/bootstrap/mixins/_alerts.scss +2 -1
  65. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +2 -1
  66. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +4 -4
  67. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +20 -11
  68. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +1 -1
  69. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
  70. data/assets/stylesheets/bootstrap/mixins/_forms.scss +4 -4
  71. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +6 -8
  72. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +2 -2
  73. data/assets/stylesheets/bootstrap/mixins/_grid.scss +8 -8
  74. data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +2 -2
  75. data/assets/stylesheets/bootstrap/mixins/_image.scss +5 -10
  76. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +3 -2
  77. data/assets/stylesheets/bootstrap/mixins/_opacity.scss +2 -3
  78. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -1
  79. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
  80. data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  81. data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +1 -5
  82. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +3 -3
  83. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +2 -1
  84. data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +3 -3
  85. data/bootstrap-sass.gemspec +10 -9
  86. data/bower.json +5 -9
  87. data/composer.json +2 -2
  88. data/eyeglass-exports.js +7 -0
  89. data/lib/bootstrap-sass.rb +18 -11
  90. data/lib/bootstrap-sass/engine.rb +6 -1
  91. data/lib/bootstrap-sass/version.rb +2 -2
  92. data/package-lock.json +1611 -0
  93. data/package.json +20 -6
  94. data/sache.json +1 -1
  95. data/tasks/converter/less_conversion.rb +20 -9
  96. data/tasks/converter/network.rb +2 -2
  97. data/templates/project/_bootstrap-variables.sass +17 -9
  98. data/test/compilation_test.rb +24 -12
  99. data/test/dummy_rails/config/application.rb +2 -1
  100. data/test/dummy_rails/config/boot.rb +1 -1
  101. data/test/dummy_sass_only/Gemfile +1 -1
  102. data/test/dummy_sass_only/compile.rb +14 -7
  103. data/test/dummy_sass_only/import_all.scss +2 -0
  104. data/test/gemfiles/default.gemfile +3 -0
  105. data/test/node_mincer_test.rb +2 -3
  106. data/test/node_sass_compile_test.sh +4 -3
  107. data/test/sass_test.rb +10 -7
  108. data/test/sprockets_rails_test.rb +12 -8
  109. data/test/support/dummy_rails_integration.rb +1 -1
  110. data/test/support/reporting.rb +10 -0
  111. data/test/test_helper.rb +3 -2
  112. metadata +38 -29
  113. data/test/compass_test.rb +0 -9
  114. data/test/dummy_sass_only/import_all.sass +0 -2
  115. data/test/gemfiles/sass_3_2.gemfile +0 -6
  116. data/test/gemfiles/sass_3_3.gemfile +0 -6
  117. data/test/gemfiles/sass_3_4.gemfile +0 -7
  118. data/test/gemfiles/sass_head.gemfile +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c548004d45f09e256dafbc81d58751358225ff42
4
- data.tar.gz: 8fabdcd1bd2e52d97ea9843cee2305d04b3aee9d
2
+ SHA256:
3
+ metadata.gz: 58feea8410ac26aa16a8887d49c39915f01053fac4d547549f22ad09cca903a2
4
+ data.tar.gz: ab2888314daa99c23c67034bb52e89cab7ad5c80fc94cafa2aa000964e6ac4a6
5
5
  SHA512:
6
- metadata.gz: 751906d2d101bb9702de434aa46fd8ce677f3a32eb3f8e15d48d682703de10daa89da77b496421ded670391f3c29ded93da092985440c8ac5228c399dfb14e2f
7
- data.tar.gz: 40ac7bb1e47dd7bf9101c75b5eff29f15ed83f5c57384e677b7079c3cbac0b594ed5b2e5cdebfce4fd76156a7dc0745afa9ccd5bb4cd471fa27466ce26bdb763
6
+ metadata.gz: 524b345c929bbd2013145b9d0efff1e9a9ae40dd92bf10084bbed4d00f1cd4a629258d337d497131be7d386badf3a512951a82670a6e6e1fc82ff34a1d6002ca
7
+ data.tar.gz: cf05215a71378dcd0f25293cd32095d947b7b748113c3e89c1d65c6f5030dc50ad6b5ecc2817695f8d530ba0ec7ef388e819c4b232c68ad2d03a564718896051
data/.gitignore CHANGED
@@ -17,3 +17,4 @@ test/dummy_rails/log/*.log
17
17
  test/dummy_rails/public/assets/
18
18
  .DS_Store
19
19
  node_modules
20
+ /.idea
@@ -1,23 +1,19 @@
1
+ dist: xenial
1
2
  language: ruby
3
+ cache: bundler
4
+ bundler_args: --path ../../vendor/bundle --without debug
2
5
  rvm:
3
- - 2.1.5
6
+ - 2.5.1
4
7
  gemfile:
5
- - test/gemfiles/sass_3_2.gemfile
6
- - test/gemfiles/sass_3_3.gemfile
7
- - test/gemfiles/sass_3_4.gemfile
8
- - test/gemfiles/sass_head.gemfile
8
+ - test/gemfiles/default.gemfile
9
9
  before_install:
10
+ - "nvm install stable"
10
11
  - "npm install"
11
- matrix:
12
- allow_failures:
13
- # rbx has issues https://github.com/rubinius/rubinius/issues/3060
14
- - rvm: rbx-2
15
- - gemfile: test/gemfiles/sass_head.gemfile
16
12
  notifications:
17
13
  slack: heybb:3n88HHilXn76ji9vV4gL819Y
18
14
  env:
19
15
  global:
20
16
  - VERBOSE=1
21
17
  script:
22
- - bundle exec rake
23
- - sh test/*.sh
18
+ bundle exec rake && bash test/*.sh
19
+ sudo: false
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.4.0
4
+
5
+ * Bootstrap rubygem now depends on SassC instead of Sass.
6
+ * Compass no longer supported.
7
+
8
+ ## 3.3.7
9
+
10
+ * Allows jQuery 3.x in bower.json. [#1048](https://github.com/twbs/bootstrap-sass/issues/1048)
11
+ * Adds the `style` and `sass` fields to package.json. [#1045](https://github.com/twbs/bootstrap-sass/issues/1045)
12
+ * Adds Eyeglass support. [#1007](https://github.com/twbs/bootstrap-sass/pull/1007)
13
+
14
+ ## 3.3.6
15
+
16
+ * Bumps Sass dependency to 3.3.4+ to avoid compatibility issues with @at-root.
17
+ * Bumps node-sass dependency to ~3.4.2 for Node.js v5 compatibility. [#986](https://github.com/twbs/bootstrap-sass/issues/986)
18
+ * Fixes breadcrumb content issues on libsass. [#919](https://github.com/twbs/bootstrap-sass/issues/919)
19
+ * Fixes a Rails 5 compatibility issue. [#965](https://github.com/twbs/bootstrap-sass/pull/965)
20
+
21
+ Framework version: Bootstrap **v3.3.6**
22
+
23
+ ## 3.3.5
24
+
25
+ Fix for standalone Compass extension compatibility. [#914](https://github.com/twbs/bootstrap-sass/issues/914)
26
+
27
+ Framework version: Bootstrap **v3.3.5**
28
+
3
29
  ## 3.3.4
4
30
 
5
31
  No Sass-specific changes.
data/Gemfile CHANGED
@@ -2,9 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- # Compass for the dummy app
6
- gem 'compass', require: false
7
-
8
5
  group :development do
9
- gem 'byebug', platforms: [:mri_21, :mri_22], require: false
6
+ gem 'byebug', platform: :mri, require: false
10
7
  end
data/LICENSE CHANGED
@@ -1,6 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2013 Twitter, Inc
3
+ Copyright (c) 2011-2016 Twitter, Inc
4
+ Copyright (c) 2011-2016 The Bootstrap Authors
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,18 +1,20 @@
1
- # Bootstrap for Sass
1
+ # Bootstrap 3 for Sass
2
2
  [![Gem Version](https://badge.fury.io/rb/bootstrap-sass.svg)](http://badge.fury.io/rb/bootstrap-sass)
3
3
  [![npm version](https://img.shields.io/npm/v/bootstrap-sass.svg?style=flat)](https://www.npmjs.com/package/bootstrap-sass)
4
4
  [![Bower Version](https://badge.fury.io/bo/bootstrap-sass.svg)](http://badge.fury.io/bo/bootstrap-sass)
5
- [![Build Status](http://img.shields.io/travis/twbs/bootstrap-sass.svg)](http://travis-ci.org/twbs/bootstrap-sass)
5
+ [![Build Status](https://img.shields.io/travis/twbs/bootstrap-sass.svg)](https://travis-ci.org/twbs/bootstrap-sass)
6
6
 
7
- `bootstrap-sass` is a Sass-powered version of [Bootstrap](http://github.com/twbs/bootstrap), ready to drop right into your Sass powered applications.
7
+ `bootstrap-sass` is a Sass-powered version of [Bootstrap](https://github.com/twbs/bootstrap) 3, ready to drop right into your Sass powered applications.
8
+
9
+ This is Bootstrap **3**. For Bootstrap **4** use the [Bootstrap rubygem](https://github.com/twbs/bootstrap-rubygem) if you use Ruby, and the [main repo](https://github.com/twbs/bootstrap) otherwise.
8
10
 
9
11
  ## Installation
10
12
 
11
13
  Please see the appropriate guide for your environment of choice:
12
14
 
13
15
  * [Ruby on Rails](#a-ruby-on-rails).
14
- * [Compass](#b-compass-without-rails) not on Rails.
15
- * [Bower](#c-bower).
16
+ * [Bower](#b-bower).
17
+ * [npm / Node.js](#c-npm--nodejs).
16
18
 
17
19
  ### a. Ruby on Rails
18
20
 
@@ -21,8 +23,8 @@ Please see the appropriate guide for your environment of choice:
21
23
  In your Gemfile you need to add the `bootstrap-sass` gem, and ensure that the `sass-rails` gem is present - it is added to new Rails applications by default.
22
24
 
23
25
  ```ruby
24
- gem 'bootstrap-sass', '~> 3.3.4'
25
- gem 'sass-rails', '>= 3.2'
26
+ gem 'bootstrap-sass', '~> 3.4.1'
27
+ gem 'sassc-rails', '>= 2.1.0'
26
28
  ```
27
29
 
28
30
  `bundle install` and restart your server to make the files available through the pipeline.
@@ -44,9 +46,20 @@ it may come with a `.css` file instead. If this file exists, it will be served i
44
46
  $ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
45
47
  ```
46
48
 
47
- Then, remove all the `//= require` and `//= require_tree` statements from the file. Instead, use `@import` to import Sass files.
49
+ Then, remove all the `*= require_self` and `*= require_tree .` statements from the sass file. Instead, use `@import` to import Sass files.
50
+
51
+ Do not use `*= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
52
+
53
+ Bootstrap JavaScript depends on jQuery.
54
+ If you're using Rails 5.1+, add the `jquery-rails` gem to your Gemfile:
48
55
 
49
- Do not use `//= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
56
+ ```ruby
57
+ gem 'jquery-rails'
58
+ ```
59
+
60
+ ```console
61
+ $ bundle install
62
+ ```
50
63
 
51
64
  Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
52
65
 
@@ -98,51 +111,9 @@ Please make sure `sprockets-rails` is at least v2.1.4.
98
111
 
99
112
  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.
100
113
 
101
- ### b. Compass without Rails
102
-
103
- Install the gem:
104
-
105
- ```console
106
- $ gem install bootstrap-sass
107
- ```
108
-
109
- If you have an existing Compass project:
110
-
111
- 1. Require `bootstrap-sass` in `config.rb`:
112
-
113
- ```ruby
114
- require 'bootstrap-sass'
115
- ```
116
-
117
- 2. Install Bootstrap with:
118
-
119
- ```console
120
- $ bundle exec compass install bootstrap -r bootstrap-sass
121
- ```
114
+ ### b. Bower
122
115
 
123
- If you are creating a new Compass project, you can generate it with bootstrap-sass support:
124
-
125
- ```console
126
- $ bundle exec compass create my-new-project -r bootstrap-sass --using bootstrap
127
- ```
128
-
129
- or, alternatively, if you're not using a Gemfile for your dependencies:
130
-
131
- ```console
132
- $ compass create my-new-project -r bootstrap-sass --using bootstrap
133
- ```
134
-
135
- This will create a new Compass project with the following files in it:
136
-
137
- * [styles.sass](/templates/project/styles.sass) - main project Sass file, imports Bootstrap and variables.
138
- * [_bootstrap-variables.sass](/templates/project/_bootstrap-variables.sass) - all of Bootstrap variables, override them here.
139
-
140
- Some bootstrap-sass mixins may conflict with the Compass ones.
141
- If this happens, change the import order so that Compass mixins are loaded later.
142
-
143
- ### c. Bower
144
-
145
- bootstrap-sass Bower package is compatible with node-sass 1.2.3+. You can install it with:
116
+ bootstrap-sass Bower package is compatible with node-sass 3.2.0+. You can install it with:
146
117
 
147
118
  ```console
148
119
  $ bower install bootstrap-sass
@@ -155,7 +126,7 @@ This is compatible by default with asset managers such as [wiredep](https://gith
155
126
 
156
127
  #### Node.js Mincer
157
128
 
158
- If you use [mincer][mincer] with node-sass, import bootstrap like so:
129
+ If you use [mincer][mincer] with node-sass, import Bootstrap like so:
159
130
 
160
131
  In `application.css.ejs.scss` (NB **.css.ejs.scss**):
161
132
 
@@ -173,10 +144,15 @@ In `application.js`:
173
144
 
174
145
  See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for mincer.
175
146
 
147
+ ### c. npm / Node.js
148
+ ```console
149
+ $ npm install bootstrap-sass
150
+ ```
176
151
 
177
- ### Configuration
178
152
 
179
- #### Sass
153
+ ## Configuration
154
+
155
+ ### Sass
180
156
 
181
157
  By default all of Bootstrap is imported.
182
158
 
@@ -189,25 +165,39 @@ In the application Sass file, replace `@import 'bootstrap'` with:
189
165
  @import 'bootstrap-custom';
190
166
  ```
191
167
 
192
- #### Sass: Number Precision
168
+ ### Sass: Number Precision
193
169
 
194
170
  bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 8 (default is 5).
195
171
 
196
- Precision is set for Rails and Compass automatically.
197
- 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:
198
174
 
199
175
  ```ruby
200
176
  ::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
201
177
  ```
202
178
 
203
- #### Sass: Autoprefixer
179
+ ### Sass: Autoprefixer
204
180
 
205
181
  Bootstrap requires the use of [Autoprefixer][autoprefixer].
206
- [Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](http://caniuse.com/).
182
+ [Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](https://caniuse.com/).
183
+
184
+ To match [upstream Bootstrap's level of browser compatibility](https://getbootstrap.com/getting-started/#support), set Autoprefixer's `browsers` option to:
185
+ ```json
186
+ [
187
+ "Android 2.3",
188
+ "Android >= 4",
189
+ "Chrome >= 20",
190
+ "Firefox >= 24",
191
+ "Explorer >= 8",
192
+ "iOS >= 6",
193
+ "Opera >= 12",
194
+ "Safari >= 6"
195
+ ]
196
+ ```
207
197
 
208
- #### JavaScript
198
+ ### JavaScript
209
199
 
210
- [`assets/javascripts/bootstrap.js`](/assets/javascripts/bootstrap.js) contains all of Bootstrap JavaScript,
200
+ [`assets/javascripts/bootstrap.js`](/assets/javascripts/bootstrap.js) contains all of Bootstrap's JavaScript,
211
201
  concatenated in the [correct order](/assets/javascripts/bootstrap-sprockets.js).
212
202
 
213
203
 
@@ -229,7 +219,7 @@ You can check dependencies in the [Bootstrap JS documentation][jsdocs].
229
219
  //= require bootstrap/dropdown
230
220
  ```
231
221
 
232
- #### Fonts
222
+ ### Fonts
233
223
 
234
224
  The fonts are referenced as:
235
225
 
@@ -250,19 +240,19 @@ When using bootstrap-sass with Compass, Sprockets, or Mincer, you **must** impor
250
240
 
251
241
  ### Sass
252
242
 
253
- Import Bootstrap into a Sass file (for example, application.scss) to get all of Bootstrap's styles, mixins and variables!
243
+ Import Bootstrap into a Sass file (for example, `application.scss`) to get all of Bootstrap's styles, mixins and variables!
254
244
 
255
245
  ```scss
256
246
  @import "bootstrap";
257
247
  ```
258
248
 
259
- You can also include optional bootstrap theme:
249
+ You can also include optional Bootstrap theme:
260
250
 
261
251
  ```scss
262
252
  @import "bootstrap/theme";
263
253
  ```
264
254
 
265
- The full list of bootstrap variables can be found [here](http://getbootstrap.com/customize/#less-variables). You can override these by simply redefining the variable before the `@import` directive, e.g.:
255
+ The full list of Bootstrap variables can be found [here](https://getbootstrap.com/customize/#less-variables). You can override these by simply redefining the variable before the `@import` directive, e.g.:
266
256
 
267
257
  ```scss
268
258
  $navbar-default-bg: #312312;
@@ -272,10 +262,26 @@ $navbar-default-color: $light-orange;
272
262
  @import "bootstrap";
273
263
  ```
274
264
 
265
+ ### Eyeglass
266
+
267
+ Bootstrap is available as an [Eyeglass](https://github.com/sass-eyeglass/eyeglass) module. After installing Bootstrap via NPM you can import the Bootstrap library via:
268
+
269
+ ```scss
270
+ @import "bootstrap-sass/bootstrap"
271
+ ```
272
+
273
+ or import only the parts of Bootstrap you need:
274
+
275
+ ```scss
276
+ @import "bootstrap-sass/bootstrap/variables";
277
+ @import "bootstrap-sass/bootstrap/mixins";
278
+ @import "bootstrap-sass/bootstrap/carousel";
279
+ ```
280
+
275
281
  ## Version
276
282
 
277
283
  Bootstrap for Sass version may differ from the upstream version in the last number, known as
278
- [MINOR](http://semver.org/spec/v2.0.0.html). The minor version may be ahead of the corresponding upstream minor.
284
+ [PATCH](https://semver.org/spec/v2.0.0.html). The patch version may be ahead of the corresponding upstream minor.
279
285
  This happens when we need to release Sass-specific changes.
280
286
 
281
287
  Before v3.3.2, Bootstrap for Sass version used to reflect the upstream version, with an additional number for
@@ -285,7 +291,7 @@ The upstream versions vs the Bootstrap for Sass versions are:
285
291
 
286
292
  | Upstream | Sass |
287
293
  |---------:|--------:|
288
- | 3.3.4 | 3.3.4 |
294
+ | 3.3.4+ | same |
289
295
  | 3.3.2 | 3.3.3 |
290
296
  | <= 3.3.1 | 3.3.1.x |
291
297
 
@@ -316,7 +322,7 @@ To convert a specific branch or version, pass the branch name or the commit hash
316
322
 
317
323
  The latest converter script is located [here][converter] and does the following:
318
324
 
319
- * Converts upstream bootstrap LESS files to its matching SCSS file.
325
+ * Converts upstream Bootstrap LESS files to its matching SCSS file.
320
326
  * Copies all upstream JavaScript into `assets/javascripts/bootstrap`, a Sprockets manifest at `assets/javascripts/bootstrap-sprockets.js`, and a concatenation at `assets/javascripts/bootstrap.js`.
321
327
  * Copies all upstream font files into `assets/fonts/bootstrap`.
322
328
  * Sets `Bootstrap::BOOTSTRAP_SHA` in [version.rb][version] to the branch sha.
@@ -339,14 +345,14 @@ and a [significant number of other contributors][contrib].
339
345
  ## You're in good company
340
346
  bootstrap-sass is used to build some awesome projects all over the web, including
341
347
  [Diaspora](https://diasporafoundation.org/), [rails_admin](https://github.com/sferik/rails_admin),
342
- Michael Hartl's [Rails Tutorial](http://railstutorial.org/), [gitlabhq](http://gitlabhq.com/) and
343
- [kandan](http://kandan.io/).
348
+ Michael Hartl's [Rails Tutorial](https://www.railstutorial.org/), [gitlabhq](http://gitlabhq.com/) and
349
+ [kandan](http://getkandan.com/).
344
350
 
345
351
  [converter]: https://github.com/twbs/bootstrap-sass/blob/master/tasks/converter/less_conversion.rb
346
352
  [version]: https://github.com/twbs/bootstrap-sass/blob/master/lib/bootstrap-sass/version.rb
347
353
  [contrib]: https://github.com/twbs/bootstrap-sass/graphs/contributors
348
354
  [antirequire]: https://github.com/twbs/bootstrap-sass/issues/79#issuecomment-4428595
349
- [jsdocs]: http://getbootstrap.com/javascript/#transitions
355
+ [jsdocs]: https://getbootstrap.com/javascript/#transitions
350
356
  [sass-precision]: http://sass-lang.com/documentation/Sass/Script/Value/Number.html#precision%3D-class_method
351
357
  [mincer]: https://github.com/nodeca/mincer
352
- [autoprefixer]: https://github.com/ai/autoprefixer
358
+ [autoprefixer]: https://github.com/postcss/autoprefixer
data/Rakefile CHANGED
@@ -1,21 +1,55 @@
1
- lib_path = File.join(File.dirname(__FILE__), 'lib')
1
+ require 'bundler/gem_tasks'
2
+
3
+ lib_path = File.join(__dir__, 'lib')
2
4
  $:.unshift(lib_path) unless $:.include?(lib_path)
3
5
 
4
6
  load './tasks/bower.rake'
5
7
 
6
8
  require 'rake/testtask'
7
- task :test do |t|
8
- $: << File.expand_path('test/')
9
- Dir.glob('./test/**/*_test.rb').each { |file| require file }
9
+ Rake::TestTask.new do |t|
10
+ t.libs << 'test'
11
+ t.test_files = FileList['test/**/*_test.rb']
12
+ t.verbose = true
13
+ end
14
+
15
+ desc 'Test all Gemfiles from test/*.gemfile'
16
+ task :test_all_gemfiles do
17
+ require 'term/ansicolor'
18
+ require 'pty'
19
+ require 'shellwords'
20
+ cmd = 'bundle install --quiet && bundle exec rake --trace'
21
+ statuses = Dir.glob('./test/gemfiles/*{[!.lock]}').map do |gemfile|
22
+ env = {'BUNDLE_GEMFILE' => gemfile}
23
+ cmd_with_env = " (#{env.map { |k, v| "export #{k}=#{Shellwords.escape v}" } * ' '}; #{cmd})"
24
+ $stderr.puts Term::ANSIColor.cyan("Testing\n#{cmd_with_env}")
25
+ PTY.spawn(env, cmd) do |r, _w, pid|
26
+ begin
27
+ r.each_line { |l| puts l }
28
+ rescue Errno::EIO
29
+ # Errno:EIO error means that the process has finished giving output.
30
+ ensure
31
+ ::Process.wait pid
32
+ end
33
+ end
34
+ [$? && $?.exitstatus == 0, cmd_with_env]
35
+ end
36
+ failed_cmds = statuses.reject(&:first).map { |(_status, cmd_with_env)| cmd_with_env }
37
+ if failed_cmds.empty?
38
+ $stderr.puts Term::ANSIColor.green('Tests pass with all gemfiles')
39
+ else
40
+ $stderr.puts Term::ANSIColor.red("Failing (#{failed_cmds.size} / #{statuses.size})\n#{failed_cmds * "\n"}")
41
+ exit 1
42
+ end
10
43
  end
11
44
 
12
45
  desc 'Dumps output to a CSS file for testing'
13
46
  task :debug do
14
- require 'sass'
47
+ require 'sassc'
48
+ require 'bootstrap-sass'
15
49
  path = Bootstrap.stylesheets_path
16
- %w(bootstrap).each do |file|
17
- engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
18
- File.open("./#{file}.css", 'w') { |f| f.write(engine.render) }
50
+ %w(_bootstrap).each do |file|
51
+ engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: ['.', path])
52
+ File.open("tmp/#{file}.css", 'w') { |f| f.write(engine.render) }
19
53
  end
20
54
  end
21
55
 
@@ -33,7 +67,8 @@ end
33
67
 
34
68
  desc 'Compile bootstrap-sass to tmp/ (or first arg)'
35
69
  task :compile, :css_path do |t, args|
36
- require 'sass'
70
+ require 'sassc'
71
+ require 'bootstrap-sass'
37
72
  require 'term/ansicolor'
38
73
 
39
74
  path = 'assets/stylesheets'
@@ -43,8 +78,8 @@ task :compile, :css_path do |t, args|
43
78
  %w(_bootstrap bootstrap/_theme).each do |file|
44
79
  save_path = "#{css_path}/#{file.sub(/(^|\/)?_+/, '\1').sub('/', '-')}.css"
45
80
  puts Term::ANSIColor.cyan(" #{save_path}") + '...'
46
- engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
47
- css = engine.render
81
+ engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: ['.', path])
82
+ css = engine.render
48
83
  File.open(save_path, 'w') { |f| f.write css }
49
84
  end
50
85
  end