diff --git a/.gitignore b/.gitignore
index 71904c3..2a7940f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,8 @@
build
-components
+bower_components
node_modules
.sass-cache
gh-pages
tmp
Gemfile.lock
-.ruby-version
\ No newline at end of file
+.ruby-version
diff --git a/Gruntfile.js b/Gruntfile.js
index dae0dac..6a30437 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,5 +1,5 @@
module.exports = function(grunt) {
- // load all grunt tasks
+ // Load all grunt tasks.
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// Project configuration.
@@ -7,14 +7,15 @@ module.exports = function(grunt) {
nodeunit: {
all: ['test/*_test.js']
},
-
+
sass: {
options: {
style: 'expanded'
},
dist: {
files: {
- 'docs/select2-bootstrap.css': 'lib/build.scss',
+ '_jekyll/css/select2-bootstrap.css': 'lib/build.scss',
+ 'docs/css/select2-bootstrap.css': 'lib/build.scss',
'select2-bootstrap.css': 'lib/build.scss'
}
},
@@ -25,17 +26,85 @@ module.exports = function(grunt) {
}
},
+ cssmin: {
+ target: {
+ files: {
+ 'select2-bootstrap.min.css': 'select2-bootstrap.css'
+ }
+ }
+ },
+
jshint: {
all: ['Gruntfile.js', '*.json']
},
bump: {
options: {
- files: ['package.json', 'bower.json', 'lib/select2-bootstrap/version.rb'],
- push: false
+ files: [
+ 'package.json',
+ 'bower.json',
+ 'lib/select2-bootstrap/version.rb'
+ ],
+ push: false,
+ createTag: false
}
- }
+ },
+
+ copy: {
+ main: {
+ files: [
+ {
+ src: 'bower_components/bootstrap/dist/css/bootstrap.min.css',
+ dest: '_jekyll/css/bootstrap.min.css',
+ expand: false
+ },
+ {
+ src: 'bower_components/bootstrap/dist/js/bootstrap.min.js',
+ dest: '_jekyll/js/bootstrap.min.js',
+ expand: false
+ },
+ {
+ src: 'bower_components/respond/dest/respond.min.js',
+ dest: '_jekyll/js/respond.min.js',
+ expand: false
+ },
+ {
+ cwd: 'bower_components/bootstrap/dist/fonts',
+ src: ['**/*'],
+ dest: '_jekyll/fonts',
+ expand: true
+ }
+ ]
+ }
+ },
+ shell: {
+ jekyllBuild: {
+ command: 'jekyll build -s _jekyll -d docs'
+ },
+ jekyllServe: {
+ command: 'jekyll serve -w -s _jekyll -d docs'
+ }
+ },
+
+ 'gh-pages': {
+ options: {
+ base: 'docs',
+ message: 'Update gh-pages.'
+ },
+ src: ['**/*']
+ },
+
+ watch: {
+ files: 'lib/select2-bootstrap.scss',
+ tasks: ['sass'],
+ options: {
+ livereload: true
+ }
+ }
});
-};
\ No newline at end of file
+ // Default tasks.
+ grunt.registerTask('build', ['sass', 'cssmin', 'copy', 'shell:jekyllBuild']);
+ grunt.registerTask('serve', ['shell:jekyllServe']);
+};
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 56409a5..0000000
--- a/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-serve_docs:
- jekyll serve --watch -s _jekyll/ -d docs/
-
-build_docs:
- jekyll build -s _jekyll/ -d docs/
-
-pages:
- cd gh-pages; git pull origin gh-pages
- rsync --exclude .git --delete -rv _jekyll/ gh-pages/
- cd gh-pages; git add -u .
- cd gh-pages; git add .
- cd gh-pages; git commit -m "Updated gh-pages."
- cd gh-pages; git push origin gh-pages
-
-pages_setup:
- mkdir gh-pages
- git init gh-pages
- cd gh-pages; git remote add origin git@github.com:t0m/select2-bootstrap-css.git
- cd gh-pages; git checkout gh-pages
diff --git a/README.md b/README.md
index 5a5178f..7e120d5 100644
--- a/README.md
+++ b/README.md
@@ -1,34 +1,91 @@
-# Select2 Bootstrap CSS
+[select2-bootstrap-css](https://github.com/t0m/select2-bootstrap-css),
+forked for Bootstrap 3.
-This is a bare bones stylesheet for making select2 fit in with bootstrap a bit better.
+Demonstrations available at
+http://fk.github.io/select2-bootstrap-css/
-The LESS file is located at lib/select2-bootstrap.less, and the SCSS file is located at lib/select2-bootstrap.scss.
+Tested with Bootstrap v3.3.2 and Select2 v3.3.2, v3.4.1-v3.4.5, v3.5.1, v3.5.2, master
+in latest Chrome, Safari, Firefox, Opera (Mac) and IE8-IE10.
-Tests are included to verify that LESS and SCSS compile down to the target CSS. To run the tests, you'll need to install [node.js](http://nodejs.org/), [Less](http://lesscss.org/), and [SASS](http://sass-lang.com/). Then you can run:
+##### Install
- npm install && bower install
- npm test
+ * [Bower](http://bower.io/): `bower install select2-bootstrap-css`
+ * [npm](http://npmjs.org/): `npm install select2-bootstrap-css`
+
+##### Known issues
+
+ * box-shadow for .select2-search input do not fit Bootstrap's defaults
+ * the Select2 dropdown could inherit look-and-feel from Bootstrap dropdowns and/or could honor Bootstrap height sizing classes
+ * checkboxes and radio-buttons in "Bootstrap input groups" could be vertically aligned to the top (instead of center) if combined with a multi Select2 to address variable height of the Select2 container
+
+##### Changelog
+
+###### v1.4.6
+
+ * Fix wrong version number in distribution sources.
+
+###### v1.4.5
+
+ * Built on Bootstrap 3 v3.3.2 and corresponding bootstrap-sass.
+
+###### v1.4.4
+
+ * Don't hardcode :focus box-shadow colour ([#58](https://github.com/t0m/select2-bootstrap-css/issues/58)).
+
+###### v1.4.3
-## Notable Changes
+ * Removed gradient for `.select2-dropdown-open.select2-drop-above [class^="select2-choice"]` in IE <= 9; really fixes [#35](https://github.com/t0m/select2-bootstrap-css/issues/35).
-Versions prior to 1.2.0 included a default width for select2 containers. Applying the class "input-default" to your select will line the select2 container up with a default bootstrap text input.
+###### v1.4.2
-## Compass
+ * Removed box-shadow for `.select2-container.form-control` (inherited from Bootstrap's `.form-control`).
+ * Fixed [#35](https://github.com/t0m/select2-bootstrap-css/issues/35).
+ * Removed border-left for `.select2-arrow` ([#36](https://github.com/t0m/select2-bootstrap-css/issues/36)).
+ * Built on Bootstrap 3 v3.3.1 and corresponding bootstrap-sass.
+ * Bower components now live in the default "bower_components" folder; ditched grunt-jekyll in favor of grunt-shell.
+ * Updated grunt plugins.
-This library can also be used as a [Compass](http://compass-style.org/) plugin.
+###### v1.4.1
-Gemfile:
+ * Fixed border-radii for `.select2-dropdown-open.select2-drop-above` (as reported by @rzschech in https://github.com/t0m/select2-bootstrap-css/issues/24#issuecomment-37683695, https://github.com/t0m/select2-bootstrap-css/issues/24#issuecomment-37688176) and `.select2-dropdown in "Bootstrap input groups with addons".
+ * Fixed an issue where using Select2 pre v3.4.2 in combination with Bootstrap v3.2.0 and when using Select2 in a "Bootstrap Input Group with Addons" context would result in the original `