From e068166940fcf4e22d3e074569710db581e4fd94 Mon Sep 17 00:00:00 2001 From: Florian Kissling Date: Mon, 2 Feb 2015 20:42:32 +0100 Subject: [PATCH 1/2] Add minified version; fixes https://github.com/t0m/select2-bootstrap-css/issues/67. --- Gruntfile.js | 10 +++++++++- package.json | 1 + select2-bootstrap.min.css | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 select2-bootstrap.min.css diff --git a/Gruntfile.js b/Gruntfile.js index 8630afa..dc0e2d5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -26,6 +26,14 @@ module.exports = function(grunt) { } }, + cssmin: { + target: { + files: { + 'select2-bootstrap.min.css': 'select2-bootstrap.css' + } + } + }, + jshint: { all: ['Gruntfile.js', '*.json'] }, @@ -76,6 +84,6 @@ module.exports = function(grunt) { }); // Default tasks. - grunt.registerTask('build', ['sass', 'copy', 'shell:jekyllBuild']); + grunt.registerTask('build', ['sass', 'cssmin', 'copy', 'shell:jekyllBuild']); grunt.registerTask('serve', ['shell:jekyllServe']); }; diff --git a/package.json b/package.json index 9e2e212..710f131 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "grunt": "~0.4.1", "grunt-bump": "0.0.11", "grunt-contrib-copy": "^0.7.0", + "grunt-contrib-cssmin": "^0.11.0", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-nodeunit": "~0.4.1", "grunt-contrib-sass": "~0.8.1", diff --git a/select2-bootstrap.min.css b/select2-bootstrap.min.css new file mode 100644 index 0000000..1623af0 --- /dev/null +++ b/select2-bootstrap.min.css @@ -0,0 +1 @@ +.select2-container.form-control{background:0 0;box-shadow:none;border:none;display:block;margin:0;padding:0}.select2-container .select2-choice,.select2-container .select2-choices,.select2-container .select2-choices .select2-search-field input{background:#fff;padding:0;border-color:#ccc;border-radius:4px;color:#555;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.select2-search input{border-color:#ccc;border-radius:4px;color:#555;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.select2-container .select2-choices .select2-search-field input{-webkit-box-shadow:none;box-shadow:none}.select2-container .select2-choice{height:34px;line-height:1.42857}.select2-container.select2-container-multi.form-control{height:auto}.input-group-sm .select2-container .select2-choice,.select2-container.input-sm .select2-choice{height:30px;line-height:1.5;border-radius:3px}.input-group-lg .select2-container .select2-choice,.select2-container.input-lg .select2-choice{height:46px;line-height:1.33;border-radius:6px}.select2-container-multi .select2-choices .select2-search-field input{height:32px}.input-group-sm .select2-container-multi .select2-choices .select2-search-field input,.select2-container-multi.input-sm .select2-choices .select2-search-field input{height:28px}.input-group-lg .select2-container-multi .select2-choices .select2-search-field input,.select2-container-multi.input-lg .select2-choices .select2-search-field input{height:44px}.select2-container-multi .select2-choices .select2-search-field input{margin:0}.select2-choice>span:first-child,.select2-chosen,.select2-container .select2-choices .select2-search-field input{padding:6px 12px}.input-group-sm .select2-choice>span:first-child,.input-group-sm .select2-choices .select2-search-field input,.input-group-sm .select2-chosen,.input-sm .select2-choice>span:first-child,.input-sm .select2-choices .select2-search-field input,.input-sm .select2-chosen{padding:5px 10px}.input-group-lg .select2-choice>span:first-child,.input-group-lg .select2-choices .select2-search-field input,.input-group-lg .select2-chosen,.input-lg .select2-choice>span:first-child,.input-lg .select2-choices .select2-search-field input,.input-lg .select2-chosen{padding:10px 16px}.select2-container-multi .select2-choices .select2-search-choice{margin-top:5px;margin-bottom:3px}.input-group-sm .select2-container-multi .select2-choices .select2-search-choice,.select2-container-multi.input-sm .select2-choices .select2-search-choice{margin-top:3px;margin-bottom:2px}.input-group-lg .select2-container-multi .select2-choices .select2-search-choice,.select2-container-multi.input-lg .select2-choices .select2-search-choice{line-height:24px}.select2-container .select2-choice .select2-arrow,.select2-container .select2-choice div{border-left:none;background:0 0;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.select2-dropdown-open .select2-choice .select2-arrow,.select2-dropdown-open .select2-choice div{border-left-color:transparent;background:0 0;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.select2-container .select2-choice .select2-arrow b,.select2-container .select2-choice div b{background-position:0 3px}.select2-dropdown-open .select2-choice .select2-arrow b,.select2-dropdown-open .select2-choice div b{background-position:-18px 3px}.input-group-sm .select2-container .select2-choice .select2-arrow b,.input-group-sm .select2-container .select2-choice div b,.select2-container.input-sm .select2-choice .select2-arrow b,.select2-container.input-sm .select2-choice div b{background-position:0 1px}.input-group-sm .select2-dropdown-open .select2-choice .select2-arrow b,.input-group-sm .select2-dropdown-open .select2-choice div b,.select2-dropdown-open.input-sm .select2-choice .select2-arrow b,.select2-dropdown-open.input-sm .select2-choice div b{background-position:-18px 1px}.input-group-lg .select2-container .select2-choice .select2-arrow b,.input-group-lg .select2-container .select2-choice div b,.select2-container.input-lg .select2-choice .select2-arrow b,.select2-container.input-lg .select2-choice div b{background-position:0 9px}.input-group-lg .select2-dropdown-open .select2-choice .select2-arrow b,.input-group-lg .select2-dropdown-open .select2-choice div b,.select2-dropdown-open.input-lg .select2-choice .select2-arrow b,.select2-dropdown-open.input-lg .select2-choice div b{background-position:-18px 9px}.has-warning .select2-choice,.has-warning .select2-choices{border-color:#8a6d3b}.has-warning .select2-container-active .select2-choice,.has-warning .select2-container-multi.select2-container-active .select2-choices{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning.select2-drop-active{border-color:#66512c}.has-warning.select2-drop-active.select2-drop.select2-drop-above{border-top-color:#66512c}.has-error .select2-choice,.has-error .select2-choices{border-color:#a94442}.has-error .select2-container-active .select2-choice,.has-error .select2-container-multi.select2-container-active .select2-choices{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error.select2-drop-active{border-color:#843534}.has-error.select2-drop-active.select2-drop.select2-drop-above{border-top-color:#843534}.has-success .select2-choice,.has-success .select2-choices{border-color:#3c763d}.has-success .select2-container-active .select2-choice,.has-success .select2-container-multi.select2-container-active .select2-choices{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success.select2-drop-active{border-color:#2b542c}.has-success.select2-drop-active.select2-drop.select2-drop-above{border-top-color:#2b542c}.select2-container-active .select2-choice,.select2-container-multi.select2-container-active .select2-choices{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.select2-drop-active{border-color:#66afe9}.select2-drop-auto-width,.select2-drop.select2-drop-above.select2-drop-active{border-top-color:#66afe9}.input-group.select2-bootstrap-prepend [class^=select2-choice]{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.input-group.select2-bootstrap-append [class^=select2-choice]{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.select2-dropdown-open [class^=select2-choice]{border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.select2-dropdown-open.select2-drop-above [class^=select2-choice]{border-radius:0 0 4px 4px!important;background:#fff;filter:none}.input-group.select2-bootstrap-prepend .select2-dropdown-open.select2-drop-above [class^=select2-choice]{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.input-group.select2-bootstrap-append .select2-dropdown-open.select2-drop-above [class^=select2-choice]{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.input-group.input-group-sm.select2-bootstrap-prepend .select2-dropdown-open.select2-drop-above [class^=select2-choice]{border-bottom-right-radius:3px!important}.input-group.input-group-lg.select2-bootstrap-prepend .select2-dropdown-open.select2-drop-above [class^=select2-choice]{border-bottom-right-radius:6px!important}.input-group.input-group-sm.select2-bootstrap-append .select2-dropdown-open.select2-drop-above [class^=select2-choice]{border-bottom-left-radius:3px!important}.input-group.input-group-lg.select2-bootstrap-append .select2-dropdown-open.select2-drop-above [class^=select2-choice]{border-bottom-left-radius:6px!important}.select2-results .select2-highlighted{color:#fff;background-color:#337ab7}.select2-bootstrap-append .input-group-btn,.select2-bootstrap-append .input-group-btn .btn,.select2-bootstrap-append .select2-container-multiple,.select2-bootstrap-prepend .input-group-btn,.select2-bootstrap-prepend .input-group-btn .btn,.select2-bootstrap-prepend .select2-container-multiple{vertical-align:top}.select2-container-multi .select2-choices .select2-search-choice{color:#555;background:#fff;border-color:#ccc;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:none;box-shadow:none}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#ebebeb;border-color:#adadad;color:#333;-webkit-box-shadow:none;box-shadow:none}.select2-search-choice-close{margin-top:-7px;top:50%}.select2-container .select2-choice abbr{top:50%}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background-color:#fcf8e3;color:#8a6d3b}.select2-container.select2-container-disabled .select2-choice,.select2-container.select2-container-disabled .select2-choices{cursor:not-allowed;background-color:#eee;border-color:#ccc}.select2-container.select2-container-disabled .select2-choice .select2-arrow,.select2-container.select2-container-disabled .select2-choice div,.select2-container.select2-container-disabled .select2-choices .select2-arrow,.select2-container.select2-container-disabled .select2-choices div{background-color:transparent;border-left:1px solid transparent}.select2-container-multi .select2-choices .select2-search-field input.select2-active,.select2-more-results.select2-active,.select2-search input.select2-active{background-position:right 4px center}.select2-offscreen,.select2-offscreen:focus{width:1px!important;height:1px!important;position:absolute!important} \ No newline at end of file From ad57405c47a947a4dcf09d179f2a4f730e60a606 Mon Sep 17 00:00:00 2001 From: Florian Kissling Date: Tue, 3 Feb 2015 01:21:20 +0100 Subject: [PATCH 2/2] Modify comment in source so that a special comment carries project name, version, license and URL. The special comment ensures that this information also shows up in the minified version. This also removes version compatibility information form the docs. --- _jekyll/css/select2-bootstrap.css | 7 +------ docs/css/select2-bootstrap.css | 7 +------ lib/select2-bootstrap.less | 7 +------ lib/select2-bootstrap.scss | 7 +------ select2-bootstrap.css | 7 +------ select2-bootstrap.min.css | 2 +- 6 files changed, 6 insertions(+), 31 deletions(-) diff --git a/_jekyll/css/select2-bootstrap.css b/_jekyll/css/select2-bootstrap.css index 41ef5d7..fa9459d 100644 --- a/_jekyll/css/select2-bootstrap.css +++ b/_jekyll/css/select2-bootstrap.css @@ -1,9 +1,4 @@ -/** - * Select2 Bootstrap 3 CSS v1.4.4 - * Tested with Bootstrap v3.3.1 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-IE11 - * MIT License - */ +/*! Select2 Bootstrap 3 CSS v1.4.4 | MIT License | github.com/t0m/select2-bootstrap-css */ /** * Reset Bootstrap 3 .form-control styles which - if applied to the * original -element the Select2-plugin may be run against - diff --git a/lib/select2-bootstrap.less b/lib/select2-bootstrap.less index ecff932..936b4f0 100644 --- a/lib/select2-bootstrap.less +++ b/lib/select2-bootstrap.less @@ -1,9 +1,4 @@ -/** - * Select2 Bootstrap 3 CSS v1.4.4 - * Tested with Bootstrap v3.3.1 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-IE11 - * MIT License - */ +/*! Select2 Bootstrap 3 CSS v1.4.4 | MIT License | github.com/t0m/select2-bootstrap-css */ /** * Reset Bootstrap 3 .form-control styles which - if applied to the diff --git a/lib/select2-bootstrap.scss b/lib/select2-bootstrap.scss index 58dd487..a425bf9 100644 --- a/lib/select2-bootstrap.scss +++ b/lib/select2-bootstrap.scss @@ -1,9 +1,4 @@ -/** - * Select2 Bootstrap 3 CSS v1.4.4 - * Tested with Bootstrap v3.3.1 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-IE11 - * MIT License - */ +/*! Select2 Bootstrap 3 CSS v1.4.4 | MIT License | github.com/t0m/select2-bootstrap-css */ /** * Reset Bootstrap 3 .form-control styles which - if applied to the diff --git a/select2-bootstrap.css b/select2-bootstrap.css index 41ef5d7..fa9459d 100644 --- a/select2-bootstrap.css +++ b/select2-bootstrap.css @@ -1,9 +1,4 @@ -/** - * Select2 Bootstrap 3 CSS v1.4.4 - * Tested with Bootstrap v3.3.1 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-IE11 - * MIT License - */ +/*! Select2 Bootstrap 3 CSS v1.4.4 | MIT License | github.com/t0m/select2-bootstrap-css */ /** * Reset Bootstrap 3 .form-control styles which - if applied to the * original