bootstrap-sass 2.3.1.3 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +20 -0
- data/.travis.yml +19 -0
- data/CHANGELOG.md +215 -0
- data/CONTRIBUTING.md +86 -0
- data/Gemfile +7 -0
- data/LICENSE +18 -10
- data/README.md +290 -67
- data/Rakefile +98 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/images/.keep +0 -0
- data/assets/javascripts/bootstrap-sprockets.js +12 -0
- data/assets/javascripts/bootstrap.js +2580 -0
- data/assets/javascripts/bootstrap.min.js +6 -0
- data/assets/javascripts/bootstrap/affix.js +164 -0
- data/assets/javascripts/bootstrap/alert.js +95 -0
- data/assets/javascripts/bootstrap/button.js +125 -0
- data/assets/javascripts/bootstrap/carousel.js +246 -0
- data/assets/javascripts/bootstrap/collapse.js +212 -0
- data/assets/javascripts/bootstrap/dropdown.js +165 -0
- data/assets/javascripts/bootstrap/modal.js +358 -0
- data/assets/javascripts/bootstrap/popover.js +123 -0
- data/assets/javascripts/bootstrap/scrollspy.js +172 -0
- data/assets/javascripts/bootstrap/tab.js +155 -0
- data/assets/javascripts/bootstrap/tooltip.js +677 -0
- data/assets/javascripts/bootstrap/transition.js +59 -0
- data/assets/stylesheets/_bootstrap-compass.scss +9 -0
- data/assets/stylesheets/_bootstrap-mincer.scss +19 -0
- data/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
- data/assets/stylesheets/_bootstrap.scss +56 -0
- data/assets/stylesheets/bootstrap/_alerts.scss +73 -0
- data/assets/stylesheets/bootstrap/_badges.scss +68 -0
- data/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
- data/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +168 -0
- data/assets/stylesheets/bootstrap/_carousel.scss +271 -0
- data/{vendor/assets → assets}/stylesheets/bootstrap/_close.scss +13 -8
- data/assets/stylesheets/bootstrap/_code.scss +69 -0
- data/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
- data/assets/stylesheets/bootstrap/_dropdowns.scss +213 -0
- data/assets/stylesheets/bootstrap/_forms.scss +607 -0
- data/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
- data/assets/stylesheets/bootstrap/_grid.scss +94 -0
- data/assets/stylesheets/bootstrap/_input-groups.scss +171 -0
- data/assets/stylesheets/bootstrap/_jumbotron.scss +54 -0
- data/assets/stylesheets/bootstrap/_labels.scss +66 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
- data/assets/stylesheets/bootstrap/_media.scss +66 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +40 -0
- data/assets/stylesheets/bootstrap/_modals.scss +150 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +656 -0
- data/assets/stylesheets/bootstrap/_navs.scss +242 -0
- data/assets/stylesheets/bootstrap/_normalize.scss +427 -0
- data/assets/stylesheets/bootstrap/_pager.scss +54 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +86 -0
- data/assets/stylesheets/bootstrap/_panels.scss +271 -0
- data/assets/stylesheets/bootstrap/_popovers.scss +126 -0
- data/assets/stylesheets/bootstrap/_print.scss +99 -0
- data/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
- data/assets/stylesheets/bootstrap/_responsive-utilities.scss +179 -0
- data/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
- data/assets/stylesheets/bootstrap/_tables.scss +234 -0
- data/assets/stylesheets/bootstrap/_theme.scss +295 -0
- data/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +112 -0
- data/assets/stylesheets/bootstrap/_type.scss +298 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +55 -0
- data/assets/stylesheets/bootstrap/_variables.scss +874 -0
- data/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +61 -0
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +56 -0
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
- data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
- data/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
- data/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- data/bootstrap-sass.gemspec +37 -0
- data/bower.json +36 -0
- data/composer.json +35 -0
- data/eyeglass-exports.js +7 -0
- data/lib/bootstrap-sass.rb +75 -35
- data/lib/bootstrap-sass/engine.rb +12 -2
- data/lib/bootstrap-sass/version.rb +4 -0
- data/package-lock.json +1611 -0
- data/package.json +44 -0
- data/sache.json +5 -0
- data/tasks/bower.rake +31 -0
- data/tasks/converter.rb +80 -0
- data/tasks/converter/char_string_scanner.rb +38 -0
- data/tasks/converter/fonts_conversion.rb +16 -0
- data/tasks/converter/js_conversion.rb +47 -0
- data/tasks/converter/less_conversion.rb +713 -0
- data/tasks/converter/logger.rb +57 -0
- data/tasks/converter/network.rb +97 -0
- data/templates/project/_bootstrap-variables.sass +875 -0
- data/templates/project/manifest.rb +15 -14
- data/templates/project/styles.sass +6 -0
- data/test/compilation_test.rb +30 -0
- data/test/dummy_node_mincer/apple-touch-icon-144-precomposed.png +0 -0
- data/test/dummy_node_mincer/application.css.ejs.scss +6 -0
- data/test/dummy_node_mincer/manifest.js +87 -0
- data/test/dummy_rails/README.rdoc +3 -0
- data/test/dummy_rails/Rakefile +6 -0
- data/test/dummy_rails/app/assets/images/.keep +0 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +2 -0
- data/test/dummy_rails/app/assets/stylesheets/application.sass +2 -0
- data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
- data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
- data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
- data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
- data/test/dummy_rails/app/views/pages/root.html.slim +84 -0
- data/test/dummy_rails/config.ru +4 -0
- data/test/dummy_rails/config/application.rb +31 -0
- data/test/dummy_rails/config/boot.rb +5 -0
- data/test/dummy_rails/config/environment.rb +5 -0
- data/test/dummy_rails/config/environments/development.rb +23 -0
- data/test/dummy_rails/config/environments/production.rb +82 -0
- data/test/dummy_rails/config/environments/test.rb +38 -0
- data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy_rails/config/initializers/inflections.rb +16 -0
- data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
- data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
- data/test/dummy_rails/config/initializers/session_store.rb +3 -0
- data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy_rails/config/locales/en.yml +3 -0
- data/test/dummy_rails/config/locales/es.yml +3 -0
- data/test/dummy_rails/config/routes.rb +3 -0
- data/test/dummy_rails/log/.keep +0 -0
- data/test/dummy_sass_only/Gemfile +4 -0
- data/test/dummy_sass_only/compile.rb +20 -0
- data/test/dummy_sass_only/import_all.scss +2 -0
- data/test/gemfiles/default.gemfile +3 -0
- data/test/node_mincer_test.rb +35 -0
- data/test/node_sass_compile_test.sh +9 -0
- data/test/pages_test.rb +14 -0
- data/test/sass_test.rb +29 -0
- data/test/sprockets_rails_test.rb +31 -0
- data/test/support/dummy_rails_integration.rb +22 -0
- data/test/support/reporting.rb +27 -0
- data/test/test_helper.rb +36 -0
- data/test/test_helper_rails.rb +6 -0
- metadata +404 -89
- data/lib/bootstrap-sass/compass_functions.rb +0 -24
- data/lib/bootstrap-sass/sass_functions.rb +0 -14
- data/templates/project/_variables.scss +0 -301
- data/templates/project/styles.scss +0 -8
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
- data/vendor/assets/javascripts/bootstrap-alert.js +0 -99
- data/vendor/assets/javascripts/bootstrap-button.js +0 -105
- data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
- data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
- data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -165
- data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
- data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
- data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
- data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
- data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
- data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
- data/vendor/assets/javascripts/bootstrap.js +0 -13
- data/vendor/assets/stylesheets/bootstrap-responsive.scss +0 -1
- data/vendor/assets/stylesheets/bootstrap.scss +0 -1
- data/vendor/assets/stylesheets/bootstrap/_accordion.scss +0 -34
- data/vendor/assets/stylesheets/bootstrap/_alerts.scss +0 -79
- data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +0 -24
- data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +0 -229
- data/vendor/assets/stylesheets/bootstrap/_buttons.scss +0 -228
- data/vendor/assets/stylesheets/bootstrap/_carousel.scss +0 -158
- data/vendor/assets/stylesheets/bootstrap/_code.scss +0 -61
- data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +0 -22
- data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +0 -237
- data/vendor/assets/stylesheets/bootstrap/_forms.scss +0 -689
- data/vendor/assets/stylesheets/bootstrap/_grid.scss +0 -21
- data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +0 -25
- data/vendor/assets/stylesheets/bootstrap/_labels-badges.scss +0 -83
- data/vendor/assets/stylesheets/bootstrap/_layouts.scss +0 -16
- data/vendor/assets/stylesheets/bootstrap/_media.scss +0 -55
- data/vendor/assets/stylesheets/bootstrap/_mixins.scss +0 -690
- data/vendor/assets/stylesheets/bootstrap/_modals.scss +0 -95
- data/vendor/assets/stylesheets/bootstrap/_navbar.scss +0 -497
- data/vendor/assets/stylesheets/bootstrap/_navs.scss +0 -409
- data/vendor/assets/stylesheets/bootstrap/_pager.scss +0 -43
- data/vendor/assets/stylesheets/bootstrap/_pagination.scss +0 -123
- data/vendor/assets/stylesheets/bootstrap/_popovers.scss +0 -133
- data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +0 -122
- data/vendor/assets/stylesheets/bootstrap/_reset.scss +0 -216
- data/vendor/assets/stylesheets/bootstrap/_responsive-1200px-min.scss +0 -28
- data/vendor/assets/stylesheets/bootstrap/_responsive-767px-max.scss +0 -193
- data/vendor/assets/stylesheets/bootstrap/_responsive-768px-979px.scss +0 -19
- data/vendor/assets/stylesheets/bootstrap/_responsive-navbar.scss +0 -189
- data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +0 -74
- data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +0 -53
- data/vendor/assets/stylesheets/bootstrap/_sprites.scss +0 -197
- data/vendor/assets/stylesheets/bootstrap/_tables.scss +0 -235
- data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +0 -53
- data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +0 -70
- data/vendor/assets/stylesheets/bootstrap/_type.scss +0 -247
- data/vendor/assets/stylesheets/bootstrap/_utilities.scss +0 -45
- data/vendor/assets/stylesheets/bootstrap/_variables.scss +0 -301
- data/vendor/assets/stylesheets/bootstrap/_wells.scss +0 -29
- data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +0 -63
- data/vendor/assets/stylesheets/bootstrap/responsive.scss +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 58feea8410ac26aa16a8887d49c39915f01053fac4d547549f22ad09cca903a2
|
4
|
+
data.tar.gz: ab2888314daa99c23c67034bb52e89cab7ad5c80fc94cafa2aa000964e6ac4a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 524b345c929bbd2013145b9d0efff1e9a9ae40dd92bf10084bbed4d00f1cd4a629258d337d497131be7d386badf3a512951a82670a6e6e1fc82ff34a1d6002ca
|
7
|
+
data.tar.gz: cf05215a71378dcd0f25293cd32095d947b7b748113c3e89c1d65c6f5030dc50ad6b5ecc2817695f8d530ba0ec7ef388e819c4b232c68ad2d03a564718896051
|
data/.gitignore
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
*.gem
|
2
|
+
.sass-cache
|
3
|
+
bootstrap.css
|
4
|
+
bootstrap-responsive.css
|
5
|
+
Gemfile.lock
|
6
|
+
*.gemfile.lock
|
7
|
+
.rvmrc
|
8
|
+
.rbenv-version
|
9
|
+
|
10
|
+
# Ignore bundler config
|
11
|
+
/.bundle
|
12
|
+
/vendor/cache
|
13
|
+
/vendor/bundle
|
14
|
+
tmp/
|
15
|
+
test/screenshots/
|
16
|
+
test/dummy_rails/log/*.log
|
17
|
+
test/dummy_rails/public/assets/
|
18
|
+
.DS_Store
|
19
|
+
node_modules
|
20
|
+
/.idea
|
data/.travis.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
dist: xenial
|
2
|
+
language: ruby
|
3
|
+
cache: bundler
|
4
|
+
bundler_args: --path ../../vendor/bundle --without debug
|
5
|
+
rvm:
|
6
|
+
- 2.5.1
|
7
|
+
gemfile:
|
8
|
+
- test/gemfiles/default.gemfile
|
9
|
+
before_install:
|
10
|
+
- "nvm install stable"
|
11
|
+
- "npm install"
|
12
|
+
notifications:
|
13
|
+
slack: heybb:3n88HHilXn76ji9vV4gL819Y
|
14
|
+
env:
|
15
|
+
global:
|
16
|
+
- VERBOSE=1
|
17
|
+
script:
|
18
|
+
bundle exec rake && bash test/*.sh
|
19
|
+
sudo: false
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,215 @@
|
|
1
|
+
# Changelog
|
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
|
+
|
29
|
+
## 3.3.4
|
30
|
+
|
31
|
+
No Sass-specific changes.
|
32
|
+
|
33
|
+
Framework version: Bootstrap **v3.3.4**
|
34
|
+
|
35
|
+
## 3.3.3
|
36
|
+
|
37
|
+
This is a re-packaged release of 3.3.2.1 (v3.3.2+1).
|
38
|
+
|
39
|
+
Versions are now strictly semver.
|
40
|
+
The PATCH version may be ahead of the upstream.
|
41
|
+
|
42
|
+
Framework version: Bootstrap **v3.3.2**.
|
43
|
+
|
44
|
+
## 3.3.2.1
|
45
|
+
|
46
|
+
* Fix glyphicons regression (revert 443d5b49eac84aec1cb2f8ea173554327bfc8c14)
|
47
|
+
|
48
|
+
## 3.3.2.0
|
49
|
+
|
50
|
+
* Autoprefixer is now required, and `autoprefixer-rails` is now a dependency for the ruby gem. [#824](https://github.com/twbs/bootstrap-sass/issues/824)
|
51
|
+
* Minimum precision reduced from 10 to 8 [#821](https://github.com/twbs/bootstrap-sass/issues/821)
|
52
|
+
* Requiring bootstrap JS from npm now works [#812](https://github.com/twbs/bootstrap-sass/issues/812)
|
53
|
+
* Fix Sass 3.4.x + IE10 compatibility issue [#803](https://github.com/twbs/bootstrap-sass/issues/803)
|
54
|
+
* Provide minified JS bundle [#777](https://github.com/twbs/bootstrap-sass/issues/777)
|
55
|
+
* Bower package is now at bootstrap-sass [#813](https://github.com/twbs/bootstrap-sass/issues/813)
|
56
|
+
|
57
|
+
|
58
|
+
## 3.3.1.0
|
59
|
+
|
60
|
+
* Variables override template at templates/project/_bootstrap-variables.sass
|
61
|
+
* Readme: Bower + Rails configuration
|
62
|
+
|
63
|
+
## 3.3.0.1
|
64
|
+
|
65
|
+
* Fix loading issue with the ruby gem version
|
66
|
+
|
67
|
+
## 3.3.0
|
68
|
+
|
69
|
+
* Improve libsass compatibility
|
70
|
+
* Support using Bower package with Rails
|
71
|
+
|
72
|
+
## 3.2.0.2
|
73
|
+
|
74
|
+
Main bootstrap file is now a partial (_bootstrap.scss), for compatibility with Compass 1+.
|
75
|
+
|
76
|
+
Fixed a number of bugs. [Issues closed in v3.2.0.2](https://github.com/twbs/bootstrap-sass/issues?q=is%3Aissue+is%3Aclosed+milestone%3Av3.2.0.2).
|
77
|
+
|
78
|
+
## 3.2.0.1
|
79
|
+
|
80
|
+
Fixed a number of bugs: [Issues closed in v3.2.0.1](https://github.com/twbs/bootstrap-sass/issues?q=is%3Aissue+is%3Aclosed+milestone%3Av3.2.0.1).
|
81
|
+
|
82
|
+
## 3.2.0.0
|
83
|
+
|
84
|
+
- Assets (Sass, JS, fonts) moved from `vendor/assets` to `assets`. `bootstrap.js` now contains concatenated JS.
|
85
|
+
- Compass generator now copies JS and fonts, and provides a better default `styles.sass`.
|
86
|
+
- Compass, Sprockets, and Mincer asset path helpers are now provided in pure Sass: `bootstrap-compass`, `bootstrap-sprockets`, and `bootstrap-mincer`.
|
87
|
+
Asset path helpers must be imported before `bootstrap`, more in Readme.
|
88
|
+
- Sprockets / Mincer JS manifest has been moved to `bootstrap-sprockets.js`.
|
89
|
+
It can be required without adding Bootstrap JS directory to load path, as it now uses relative paths.
|
90
|
+
- Sprockets: `depend_on_asset` (`glyphicons.scss`) has been changed to `depend_on` to work around an issue with `depend_on_asset`.
|
91
|
+
[More information](https://github.com/twbs/bootstrap-sass/issues/592#issuecomment-46570286).
|
92
|
+
|
93
|
+
## 3.1.1.0
|
94
|
+
|
95
|
+
- Updated Bower docs
|
96
|
+
|
97
|
+
## 3.1.0.2
|
98
|
+
|
99
|
+
- #523: Rails 3.2 compatibility
|
100
|
+
- Bugfixes from upstream up to 7eb532262fbd1112215b5a547b9285794b5360ab.
|
101
|
+
|
102
|
+
## 3.1.0.1
|
103
|
+
|
104
|
+
- #518: `scale` mixin Sass compatibility issue
|
105
|
+
|
106
|
+
## 3.1.0.0
|
107
|
+
|
108
|
+
* compiles with libsass master
|
109
|
+
|
110
|
+
## 3.0.2.1
|
111
|
+
|
112
|
+
* fix vendor paths for compass
|
113
|
+
|
114
|
+
## 3.0.0.0
|
115
|
+
|
116
|
+
* Fully automated (lots of string juggling) LESS -> Sass conversion. - *Gleb Mazovetskiy*
|
117
|
+
* Ported rake task from vwall/compass-twitter-bootstrap to convert Bootstrap upstream - *Peter Gumeson*
|
118
|
+
* Moved javascripts to us `bootstrap-component.js` to `bootstrap/component.js` - *Peter Gumeson*
|
119
|
+
|
120
|
+
## 2.3.2.2
|
121
|
+
|
122
|
+
* Allow sass-rails `>= 3.2` - *Thomas McDonald*
|
123
|
+
|
124
|
+
## 2.3.2.1
|
125
|
+
|
126
|
+
## 2.3.2.0
|
127
|
+
|
128
|
+
* Update to Bootstrap 2.3.2 - *Dan Allen*
|
129
|
+
|
130
|
+
## 2.3.1.3
|
131
|
+
|
132
|
+
* Find the correct Sprockets context for the `image_path` function - *Tristan Harward, Gleb Mazovetskiy*
|
133
|
+
|
134
|
+
## 2.3.1.2
|
135
|
+
|
136
|
+
* Fix changes to image url - *Gleb Mazovetskiy*
|
137
|
+
* Copy _variables into project on Compass install - *Phil Thompson*
|
138
|
+
* Add `bootstrap-affix` to the Compass template file - *brief*
|
139
|
+
|
140
|
+
## 2.3.1.1 (yanked)
|
141
|
+
|
142
|
+
* Change how image_url is handled internally - *Tristan Harward*
|
143
|
+
* Fix some font variables not having `!default` - *Thomas McDonald*
|
144
|
+
|
145
|
+
## 2.3.0.0
|
146
|
+
* [#290] Update to Bootstrap 2.3.0 - *Tristan Harward*
|
147
|
+
* Fix `rake:debug` with new file locations - *Thomas McDonald*
|
148
|
+
* Add draft contributing document - *Thomas McDonald*
|
149
|
+
* [#260] Add our load path to the global Sass load path - *Tristan Harward*
|
150
|
+
* [#275] Use GitHub notation in Sass head testing gemfile - *Timo Schilling*
|
151
|
+
* [#279, #283] Readme improvements - *theverything, Philip Arndt*
|
152
|
+
|
153
|
+
## 2.2.2.0
|
154
|
+
* [#270] Update to Bootstrap 2.2.2 - *Tristan Harward*
|
155
|
+
* [#266] Add license to gemspec - *Peter Marsh*
|
156
|
+
|
157
|
+
## 2.2.1.1
|
158
|
+
* [#258] Use `bootstrap` prefix for `@import`ing files in `bootstrap/bootstrap.scss` - *Umair Siddique*
|
159
|
+
|
160
|
+
## 2.2.1.0
|
161
|
+
* [#246] Update to Bootstrap 2.2.1 - *Tristan Harward*
|
162
|
+
* [#246] Pull Bootstrap updates from jlong/sass-twitter-bootstrap - *Tristan Harward*
|
163
|
+
|
164
|
+
## 2.1.1.0
|
165
|
+
* Update to Bootstrap 2.1.1
|
166
|
+
* [#222] Remove 100% multiplier in vertical-three-colours
|
167
|
+
* [#227] Fix IE component animation collapse
|
168
|
+
* [#228] Fix variables documentation link
|
169
|
+
* [#231] Made .input-block-level a class as well as mixin
|
170
|
+
|
171
|
+
## 2.1.0.1
|
172
|
+
* [#219] Fix expected a color. Got: transparent.
|
173
|
+
* [#207] Add missing warning style for table row highlighting
|
174
|
+
* [#208] Use grid-input-span for input spans
|
175
|
+
|
176
|
+
## 2.1.0.0
|
177
|
+
* Updated to Bootstrap 2.1
|
178
|
+
* Changed some mixin names to be more consistent. Nested mixins in Less are separated by a `-` when they are flattened in Sass.
|
179
|
+
|
180
|
+
## 2.0.4.1
|
181
|
+
* Fix `.row-fluid > spanX` nesting
|
182
|
+
* Small Javascript fixes for those staying on the 2.0.4 release
|
183
|
+
* Add `!default` to z-index variables.
|
184
|
+
|
185
|
+
## 2.0.4.0
|
186
|
+
* Updated to Bootstrap 2.0.4
|
187
|
+
* Switched to Bootstrap 2.0.3+'s method of separating responsive files
|
188
|
+
* [#149, #150] Fix off by one error introduced with manual revert of media query breakpoints
|
189
|
+
* `rake debug` and `rake test` both compile bootstrap & bootstrap-responsive
|
190
|
+
|
191
|
+
## 2.0.3.1
|
192
|
+
* [#145, #146] Fix button alignment in collapsing navbar as a result of an incorrect variable
|
193
|
+
|
194
|
+
## 2.0.3
|
195
|
+
* Updated to Bootstrap 2.0.3
|
196
|
+
* [#106] Support for Rails < 3.1 through Compass
|
197
|
+
* [#132] Add CI testing
|
198
|
+
* [#106] Support Rails w/Compass
|
199
|
+
* [#134] Fix support for Rails w/Compass
|
200
|
+
|
201
|
+
## 2.0.2
|
202
|
+
* [#86] Updated to Bootstrap 2.0.2
|
203
|
+
Things of note: static navbars now have full width. (to be fixed in 2.0.3) `.navbar-inner > .container { width:940px; }` seems to work in the meanwhile
|
204
|
+
* [#62] Fixed asset compilation taking a *very* long time.
|
205
|
+
* [#69, #79, #80] \(Hopefully) clarified README. Now with less cat humour.
|
206
|
+
* [#91] Removed doubled up Sass extensions for Rails.
|
207
|
+
* [#63, #73] Allow for overriding of image-path
|
208
|
+
* [[SO](http://stackoverflow.com/a/9909626/241212)] Added makeFluidColumn mixin for defining fluid columns. Fluid rows must use `@extend .row-fluid`, and any column inside it can use `@include makeFluidColumn(num)`, where `num` is the number of columns. Unfortunately, there is a rather major limitation to this: margins on first-child elements must be overriden. See the attached Stack Overflow answer for more information.
|
209
|
+
|
210
|
+
## 2.0.1
|
211
|
+
* Updated to Bootstrap 2.0.1
|
212
|
+
* Modified `@mixin opacity()` to take an argument `0...1` rather than `0...100` to be consistent with Compass.
|
213
|
+
|
214
|
+
## 2.0.0
|
215
|
+
* Updated to Bootstrap 2.0.0
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
# Contributing to bootstrap-sass
|
2
|
+
|
3
|
+
## Asset Changes
|
4
|
+
|
5
|
+
Any changes to `bootstrap-sass` assets (scss, javascripts, fonts) should be checked against the `convert` rake task.
|
6
|
+
For usage instructions, see the [README](/README.md).
|
7
|
+
|
8
|
+
If something is broken in the converter, it's preferable to update the converter along with the asset itself.
|
9
|
+
|
10
|
+
|
11
|
+
## Bugs
|
12
|
+
|
13
|
+
A bug is a _demonstrable problem_ that is caused by the code in the
|
14
|
+
repository. Good bug reports are extremely helpful - thank you!
|
15
|
+
|
16
|
+
Guidelines for bug reports:
|
17
|
+
|
18
|
+
1. **Does it belong here?** — is this a problem with bootstrap-sass, or
|
19
|
+
it an issue with [twbs/bootstrap](https://github.com/twbs/bootstrap)?
|
20
|
+
We only distribute a direct port and will not modify files if they're not
|
21
|
+
changed upstream.
|
22
|
+
|
23
|
+
2. **Use the GitHub issue search** — check if the issue has already been
|
24
|
+
reported.
|
25
|
+
|
26
|
+
3. **Isolate the problem** — ideally create a [reduced test
|
27
|
+
case](http://css-tricks.com/6263-reduced-test-cases/) and a live example.
|
28
|
+
|
29
|
+
A good bug report shouldn't leave others needing to chase you up for more
|
30
|
+
information. Please try to be as detailed as possible in your report. What is
|
31
|
+
your environment? What steps will reproduce the issue? What browser(s) and OS
|
32
|
+
experience the problem? What would you expect to be the outcome? All these
|
33
|
+
details will help people to fix any potential bugs.
|
34
|
+
|
35
|
+
Example:
|
36
|
+
|
37
|
+
> Short and descriptive example bug report title
|
38
|
+
>
|
39
|
+
> A summary of the issue and the browser/OS environment in which it occurs. If
|
40
|
+
> suitable, include the steps required to reproduce the bug.
|
41
|
+
>
|
42
|
+
> 1. This is the first step
|
43
|
+
> 2. This is the second step
|
44
|
+
> 3. Further steps, etc.
|
45
|
+
>
|
46
|
+
> `<url>` (a link to the reduced test case)
|
47
|
+
>
|
48
|
+
> Any other information you want to share that is relevant to the issue being
|
49
|
+
> reported. This might include the lines of code that you have identified as
|
50
|
+
> causing the bug, and potential solutions (and your opinions on their
|
51
|
+
> merits).
|
52
|
+
|
53
|
+
**[File a bug report](https://github.com/twbs/bootstrap-sass/issues/)**
|
54
|
+
|
55
|
+
|
56
|
+
## Pull requests
|
57
|
+
|
58
|
+
**We will not accept pull requests that modify the SCSS beyond fixing bugs caused by *our* code!**
|
59
|
+
|
60
|
+
We use a [converter script][converter-readme] to automatically convert upstream bootstrap, written in LESS, to Sass.
|
61
|
+
|
62
|
+
Issues related to styles or javascript but unrelated to the conversion process should go to [twbs/bootstrap][upstream].
|
63
|
+
|
64
|
+
Pull requests that fix bugs caused by our code should not modify the SCSS directly, but should patch the converter instead.
|
65
|
+
|
66
|
+
Good pull requests - patches, improvements, new features - are a fantastic
|
67
|
+
help. They should remain focused in scope and avoid containing unrelated
|
68
|
+
commits. If your contribution involves a significant amount of work or substantial
|
69
|
+
changes to any part of the project, please open an issue to discuss it first.
|
70
|
+
|
71
|
+
Make sure to adhere to the coding conventions used throughout a project
|
72
|
+
(indentation, accurate comments, etc.). Please update any documentation that is
|
73
|
+
relevant to the change you're making.
|
74
|
+
|
75
|
+
## Do not…
|
76
|
+
|
77
|
+
Please **do not** use the issue tracker for personal support requests (use
|
78
|
+
[Stack Overflow](http://stackoverflow.com/)).
|
79
|
+
|
80
|
+
Please **do not** derail or troll issues. Keep the
|
81
|
+
discussion on topic and respect the opinions of others.
|
82
|
+
|
83
|
+
*props [html5-boilerplate](https://github.com/h5bp/html5-boilerplate/blob/master/CONTRIBUTING.md)*
|
84
|
+
|
85
|
+
[upstream]: https://github.com/twbs/bootstrap
|
86
|
+
[converter-readme]: https://github.com/twbs/bootstrap-sass/blob/master/README.md#upstream-converter
|
data/Gemfile
ADDED
data/LICENSE
CHANGED
@@ -1,14 +1,22 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
You may obtain a copy of the License at
|
3
|
+
Copyright (c) 2011-2016 Twitter, Inc
|
4
|
+
Copyright (c) 2011-2016 The Bootstrap Authors
|
6
5
|
|
7
|
-
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
8
12
|
|
9
|
-
|
10
|
-
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
See the License for the specific language governing permissions and
|
13
|
-
limitations under the License.
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
14
|
+
all copies or substantial portions of the Software.
|
14
15
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,135 +1,358 @@
|
|
1
|
-
# Bootstrap for Sass
|
1
|
+
# Bootstrap 3 for Sass
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/bootstrap-sass.svg)](http://badge.fury.io/rb/bootstrap-sass)
|
3
|
+
[![npm version](https://img.shields.io/npm/v/bootstrap-sass.svg?style=flat)](https://www.npmjs.com/package/bootstrap-sass)
|
4
|
+
[![Bower Version](https://badge.fury.io/bo/bootstrap-sass.svg)](http://badge.fury.io/bo/bootstrap-sass)
|
5
|
+
[![Build Status](https://img.shields.io/travis/twbs/bootstrap-sass.svg)](https://travis-ci.org/twbs/bootstrap-sass)
|
2
6
|
|
3
|
-
[
|
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.
|
4
8
|
|
5
|
-
|
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.
|
6
10
|
|
7
|
-
|
11
|
+
## Installation
|
8
12
|
|
9
|
-
|
13
|
+
Please see the appropriate guide for your environment of choice:
|
14
|
+
|
15
|
+
* [Ruby on Rails](#a-ruby-on-rails).
|
16
|
+
* [Bower](#b-bower).
|
17
|
+
* [npm / Node.js](#c-npm--nodejs).
|
10
18
|
|
11
|
-
### Rails
|
19
|
+
### a. Ruby on Rails
|
12
20
|
|
13
|
-
|
21
|
+
`bootstrap-sass` is easy to drop into Rails with the asset pipeline.
|
22
|
+
|
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.
|
14
24
|
|
15
25
|
```ruby
|
16
|
-
gem 'sass
|
17
|
-
gem '
|
26
|
+
gem 'bootstrap-sass', '~> 3.4.1'
|
27
|
+
gem 'sassc-rails', '>= 2.1.0'
|
18
28
|
```
|
19
29
|
|
20
|
-
`bundle install` and restart your server to make the files available.
|
21
|
-
|
22
|
-
#### Rails 4
|
30
|
+
`bundle install` and restart your server to make the files available through the pipeline.
|
23
31
|
|
24
|
-
|
32
|
+
Import Bootstrap styles in `app/assets/stylesheets/application.scss`:
|
25
33
|
|
26
|
-
|
34
|
+
```scss
|
35
|
+
// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
|
36
|
+
@import "bootstrap-sprockets";
|
37
|
+
@import "bootstrap";
|
38
|
+
```
|
27
39
|
|
28
|
-
|
40
|
+
`bootstrap-sprockets` must be imported before `bootstrap` for the icon fonts to work.
|
29
41
|
|
30
|
-
|
42
|
+
Make sure the file has `.scss` extension (or `.sass` for Sass syntax). If you have just generated a new Rails app,
|
43
|
+
it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so rename it:
|
31
44
|
|
32
|
-
```
|
33
|
-
|
45
|
+
```console
|
46
|
+
$ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
|
34
47
|
```
|
35
48
|
|
36
|
-
|
49
|
+
Then, remove all the `*= require_self` and `*= require_tree .` statements from the sass file. Instead, use `@import` to import Sass files.
|
37
50
|
|
38
|
-
|
51
|
+
Do not use `*= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
|
39
52
|
|
40
|
-
|
53
|
+
Bootstrap JavaScript depends on jQuery.
|
54
|
+
If you're using Rails 5.1+, add the `jquery-rails` gem to your Gemfile:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
gem 'jquery-rails'
|
58
|
+
```
|
59
|
+
|
60
|
+
```console
|
61
|
+
$ bundle install
|
62
|
+
```
|
63
|
+
|
64
|
+
Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
|
41
65
|
|
42
66
|
```js
|
43
|
-
|
44
|
-
//= require bootstrap
|
67
|
+
//= require jquery
|
68
|
+
//= require bootstrap-sprockets
|
69
|
+
```
|
70
|
+
|
71
|
+
`bootstrap-sprockets` and `bootstrap` [should not both be included](https://github.com/twbs/bootstrap-sass/issues/829#issuecomment-75153827) in `application.js`.
|
72
|
+
|
73
|
+
`bootstrap-sprockets` provides individual Bootstrap Javascript files (`alert.js` or `dropdown.js`, for example), while
|
74
|
+
`bootstrap` provides a concatenated file containing all Bootstrap Javascripts.
|
75
|
+
|
76
|
+
#### Bower with Rails
|
77
|
+
|
78
|
+
When using [bootstrap-sass Bower package](#c-bower) instead of the gem in Rails, configure assets in `config/application.rb`:
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
# Bower asset paths
|
82
|
+
root.join('vendor', 'assets', 'bower_components').to_s.tap do |bower_path|
|
83
|
+
config.sass.load_paths << bower_path
|
84
|
+
config.assets.paths << bower_path
|
85
|
+
end
|
86
|
+
# Precompile Bootstrap fonts
|
87
|
+
config.assets.precompile << %r(bootstrap-sass/assets/fonts/bootstrap/[\w-]+\.(?:eot|svg|ttf|woff2?)$)
|
88
|
+
# Minimum Sass number precision required by bootstrap-sass
|
89
|
+
::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
|
90
|
+
```
|
91
|
+
|
92
|
+
Replace Bootstrap `@import` statements in `application.scss` with:
|
93
|
+
|
94
|
+
```scss
|
95
|
+
$icon-font-path: "bootstrap-sass/assets/fonts/bootstrap/";
|
96
|
+
@import "bootstrap-sass/assets/stylesheets/bootstrap-sprockets";
|
97
|
+
@import "bootstrap-sass/assets/stylesheets/bootstrap";
|
45
98
|
```
|
46
99
|
|
47
|
-
|
100
|
+
Replace Bootstrap `require` directive in `application.js` with:
|
48
101
|
|
49
102
|
```js
|
50
|
-
//= require bootstrap-
|
51
|
-
//= require bootstrap-modal
|
52
|
-
//= require bootstrap-dropdown
|
103
|
+
//= require bootstrap-sass/assets/javascripts/bootstrap-sprockets
|
53
104
|
```
|
54
105
|
|
55
|
-
|
106
|
+
#### Rails 4.x
|
56
107
|
|
57
|
-
|
108
|
+
Please make sure `sprockets-rails` is at least v2.1.4.
|
58
109
|
|
59
|
-
|
110
|
+
#### Rails 3.2.x
|
60
111
|
|
61
|
-
|
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.
|
62
113
|
|
63
|
-
|
114
|
+
### b. Bower
|
115
|
+
|
116
|
+
bootstrap-sass Bower package is compatible with node-sass 3.2.0+. You can install it with:
|
64
117
|
|
65
118
|
```console
|
66
|
-
|
67
|
-
compass create compass-test -r bootstrap-sass --using bootstrap
|
119
|
+
$ bower install bootstrap-sass
|
68
120
|
```
|
69
121
|
|
70
|
-
|
122
|
+
Sass, JS, and all other assets are located at [assets](/assets).
|
71
123
|
|
72
|
-
|
73
|
-
|
74
|
-
* We'll also copy the Bootstrap javascripts & images into their respective folders for you, absolutely free of charge! How cool is that?
|
124
|
+
By default, `bower.json` main field list only the main `_bootstrap.scss` and all the static assets (fonts and JS).
|
125
|
+
This is compatible by default with asset managers such as [wiredep](https://github.com/taptapship/wiredep).
|
75
126
|
|
76
|
-
####
|
127
|
+
#### Node.js Mincer
|
77
128
|
|
78
|
-
|
129
|
+
If you use [mincer][mincer] with node-sass, import Bootstrap like so:
|
79
130
|
|
80
|
-
|
81
|
-
|
131
|
+
In `application.css.ejs.scss` (NB **.css.ejs.scss**):
|
132
|
+
|
133
|
+
```scss
|
134
|
+
// Import mincer asset paths helper integration
|
135
|
+
@import "bootstrap-mincer";
|
136
|
+
@import "bootstrap";
|
82
137
|
```
|
83
138
|
|
84
|
-
|
85
|
-
|
86
|
-
|
139
|
+
In `application.js`:
|
140
|
+
|
141
|
+
```js
|
142
|
+
//= require bootstrap-sprockets
|
87
143
|
```
|
88
144
|
|
145
|
+
See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for mincer.
|
146
|
+
|
147
|
+
### c. npm / Node.js
|
89
148
|
```console
|
90
|
-
|
149
|
+
$ npm install bootstrap-sass
|
91
150
|
```
|
92
151
|
|
93
|
-
You'll get the same benefits as those starting from scratch. Radical.
|
94
152
|
|
95
153
|
## Configuration
|
96
|
-
|
154
|
+
|
155
|
+
### Sass
|
156
|
+
|
157
|
+
By default all of Bootstrap is imported.
|
158
|
+
|
159
|
+
You can also import components explicitly. To start with a full list of modules copy
|
160
|
+
[`_bootstrap.scss`](assets/stylesheets/_bootstrap.scss) file into your assets as `_bootstrap-custom.scss`.
|
161
|
+
Then comment out components you do not want from `_bootstrap-custom`.
|
162
|
+
In the application Sass file, replace `@import 'bootstrap'` with:
|
97
163
|
|
98
164
|
```scss
|
99
|
-
|
165
|
+
@import 'bootstrap-custom';
|
166
|
+
```
|
167
|
+
|
168
|
+
### Sass: Number Precision
|
169
|
+
|
170
|
+
bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 8 (default is 5).
|
171
|
+
|
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:
|
174
|
+
|
175
|
+
```ruby
|
176
|
+
::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
|
177
|
+
```
|
178
|
+
|
179
|
+
### Sass: Autoprefixer
|
180
|
+
|
181
|
+
Bootstrap requires the use of [Autoprefixer][autoprefixer].
|
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
|
+
```
|
197
|
+
|
198
|
+
### JavaScript
|
199
|
+
|
200
|
+
[`assets/javascripts/bootstrap.js`](/assets/javascripts/bootstrap.js) contains all of Bootstrap's JavaScript,
|
201
|
+
concatenated in the [correct order](/assets/javascripts/bootstrap-sprockets.js).
|
202
|
+
|
203
|
+
|
204
|
+
#### JavaScript with Sprockets or Mincer
|
205
|
+
|
206
|
+
If you use Sprockets or Mincer, you can require `bootstrap-sprockets` instead to load the individual modules:
|
207
|
+
|
208
|
+
```js
|
209
|
+
// Load all Bootstrap JavaScript
|
210
|
+
//= require bootstrap-sprockets
|
211
|
+
```
|
212
|
+
|
213
|
+
You can also load individual modules, provided you also require any dependencies.
|
214
|
+
You can check dependencies in the [Bootstrap JS documentation][jsdocs].
|
215
|
+
|
216
|
+
```js
|
217
|
+
//= require bootstrap/scrollspy
|
218
|
+
//= require bootstrap/modal
|
219
|
+
//= require bootstrap/dropdown
|
220
|
+
```
|
221
|
+
|
222
|
+
### Fonts
|
223
|
+
|
224
|
+
The fonts are referenced as:
|
225
|
+
|
226
|
+
```scss
|
227
|
+
"#{$icon-font-path}#{$icon-font-name}.eot"
|
228
|
+
```
|
229
|
+
|
230
|
+
`$icon-font-path` defaults to `bootstrap/` if asset path helpers are used, and `../fonts/bootstrap/` otherwise.
|
231
|
+
|
232
|
+
When using bootstrap-sass with Compass, Sprockets, or Mincer, you **must** import the relevant path helpers before Bootstrap itself, for example:
|
233
|
+
|
234
|
+
```scss
|
235
|
+
@import "bootstrap-compass";
|
100
236
|
@import "bootstrap";
|
101
237
|
```
|
102
238
|
|
103
|
-
|
239
|
+
## Usage
|
104
240
|
|
105
|
-
###
|
241
|
+
### Sass
|
106
242
|
|
107
|
-
|
243
|
+
Import Bootstrap into a Sass file (for example, `application.scss`) to get all of Bootstrap's styles, mixins and variables!
|
108
244
|
|
109
245
|
```scss
|
110
|
-
|
111
|
-
@include box-shadow(#{0 2px 5px rgba(0,0,0,.25) inset, 0 -2px 5px rgba(0,0,0,.25) inset});
|
112
|
-
}
|
246
|
+
@import "bootstrap";
|
113
247
|
```
|
114
248
|
|
115
|
-
|
116
|
-
As per the Bootstrap project we don't include the responsive styles by default. `@import "bootstrap-responsive";` to get them.
|
249
|
+
You can also include optional Bootstrap theme:
|
117
250
|
|
118
|
-
|
119
|
-
|
251
|
+
```scss
|
252
|
+
@import "bootstrap/theme";
|
253
|
+
```
|
120
254
|
|
121
|
-
|
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.:
|
122
256
|
|
123
|
-
|
257
|
+
```scss
|
258
|
+
$navbar-default-bg: #312312;
|
259
|
+
$light-orange: #ff8c00;
|
260
|
+
$navbar-default-color: $light-orange;
|
124
261
|
|
125
|
-
|
126
|
-
|
262
|
+
@import "bootstrap";
|
263
|
+
```
|
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"
|
127
271
|
```
|
128
272
|
|
129
|
-
|
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
|
+
|
281
|
+
## Version
|
282
|
+
|
283
|
+
Bootstrap for Sass version may differ from the upstream version in the last number, known as
|
284
|
+
[PATCH](https://semver.org/spec/v2.0.0.html). The patch version may be ahead of the corresponding upstream minor.
|
285
|
+
This happens when we need to release Sass-specific changes.
|
286
|
+
|
287
|
+
Before v3.3.2, Bootstrap for Sass version used to reflect the upstream version, with an additional number for
|
288
|
+
Sass-specific changes. This was changed due to Bower and npm compatibility issues.
|
289
|
+
|
290
|
+
The upstream versions vs the Bootstrap for Sass versions are:
|
291
|
+
|
292
|
+
| Upstream | Sass |
|
293
|
+
|---------:|--------:|
|
294
|
+
| 3.3.4+ | same |
|
295
|
+
| 3.3.2 | 3.3.3 |
|
296
|
+
| <= 3.3.1 | 3.3.1.x |
|
297
|
+
|
298
|
+
Always refer to [CHANGELOG.md](/CHANGELOG.md) when upgrading.
|
299
|
+
|
300
|
+
---
|
301
|
+
|
302
|
+
## Development and Contributing
|
303
|
+
|
304
|
+
If you'd like to help with the development of bootstrap-sass itself, read this section.
|
305
|
+
|
306
|
+
### Upstream Converter
|
307
|
+
|
308
|
+
Keeping bootstrap-sass in sync with upstream changes from Bootstrap used to be an error prone and time consuming manual process. With Bootstrap 3 we have introduced a converter that automates this.
|
309
|
+
|
310
|
+
**Note: if you're just looking to *use* Bootstrap 3, see the [installation](#installation) section above.**
|
311
|
+
|
312
|
+
Upstream changes to the Bootstrap project can now be pulled in using the `convert` rake task.
|
313
|
+
|
314
|
+
Here's an example run that would pull down the master branch from the main [twbs/bootstrap](https://github.com/twbs/bootstrap) repo:
|
315
|
+
|
316
|
+
rake convert
|
317
|
+
|
318
|
+
This will convert the latest LESS to Sass and update to the latest JS.
|
319
|
+
To convert a specific branch or version, pass the branch name or the commit hash as the first task argument:
|
320
|
+
|
321
|
+
rake convert[e8a1df5f060bf7e6631554648e0abde150aedbe4]
|
322
|
+
|
323
|
+
The latest converter script is located [here][converter] and does the following:
|
324
|
+
|
325
|
+
* Converts upstream Bootstrap LESS files to its matching SCSS file.
|
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`.
|
327
|
+
* Copies all upstream font files into `assets/fonts/bootstrap`.
|
328
|
+
* Sets `Bootstrap::BOOTSTRAP_SHA` in [version.rb][version] to the branch sha.
|
329
|
+
|
330
|
+
This converter fully converts original LESS to SCSS. Conversion is automatic but requires instructions for certain transformations (see converter output).
|
331
|
+
Please submit GitHub issues tagged with `conversion`.
|
332
|
+
|
333
|
+
## Credits
|
334
|
+
|
335
|
+
bootstrap-sass has a number of major contributors:
|
336
|
+
|
337
|
+
<!-- feel free to make these link wherever you wish -->
|
338
|
+
* [Thomas McDonald](https://twitter.com/thomasmcdonald_)
|
339
|
+
* [Tristan Harward](http://www.trisweb.com)
|
340
|
+
* Peter Gumeson
|
341
|
+
* [Gleb Mazovetskiy](https://github.com/glebm)
|
130
342
|
|
131
|
-
|
132
|
-
bootstrap-sass is a project by [Thomas McDonald](https://twitter.com/#!/thomasmcdonald_), with support from [other awesome people](https://github.com/thomas-mcdonald/bootstrap-sass/graphs/contributors).
|
343
|
+
and a [significant number of other contributors][contrib].
|
133
344
|
|
134
345
|
## You're in good company
|
135
|
-
bootstrap-sass is used to build some awesome projects
|
346
|
+
bootstrap-sass is used to build some awesome projects all over the web, including
|
347
|
+
[Diaspora](https://diasporafoundation.org/), [rails_admin](https://github.com/sferik/rails_admin),
|
348
|
+
Michael Hartl's [Rails Tutorial](https://www.railstutorial.org/), [gitlabhq](http://gitlabhq.com/) and
|
349
|
+
[kandan](http://getkandan.com/).
|
350
|
+
|
351
|
+
[converter]: https://github.com/twbs/bootstrap-sass/blob/master/tasks/converter/less_conversion.rb
|
352
|
+
[version]: https://github.com/twbs/bootstrap-sass/blob/master/lib/bootstrap-sass/version.rb
|
353
|
+
[contrib]: https://github.com/twbs/bootstrap-sass/graphs/contributors
|
354
|
+
[antirequire]: https://github.com/twbs/bootstrap-sass/issues/79#issuecomment-4428595
|
355
|
+
[jsdocs]: https://getbootstrap.com/javascript/#transitions
|
356
|
+
[sass-precision]: http://sass-lang.com/documentation/Sass/Script/Value/Number.html#precision%3D-class_method
|
357
|
+
[mincer]: https://github.com/nodeca/mincer
|
358
|
+
[autoprefixer]: https://github.com/postcss/autoprefixer
|