Skip to content

Commit

Permalink
Merge pull request #7 from djibe/master
Browse files Browse the repository at this point in the history
Compatible with BS 4.1.1
  • Loading branch information
Berkan Akyürek authored May 14, 2018
2 parents c90045b + 12890dd commit 3ba799b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 26 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#### Compatibility

Tested with Bootstrap v4.0.0-beta.2 and Select2 v4.0.5 in latest Chrome and Safari (Mac).
Tested with Bootstrap v4.1.1 and Select2 v4.0.6rc1 in latest Firefox, Chrome and Safari (Mac).

#### Installation

Expand Down Expand Up @@ -41,6 +41,10 @@ $.fn.select2.defaults.set( "theme", "bootstrap4" );

#### Changelog

##### Version 1.0.2

* Latest build for Bootstrap 4.1.1

##### Version 1.0.1

* Fixed some bugs when running `npm run dev`;
Expand All @@ -52,4 +56,4 @@ $.fn.select2.defaults.set( "theme", "bootstrap4" );

#### Copyright and license

The license is available within the repository in the [LICENSE](LICENSE) file.
The license is available within the repository in the [LICENSE](LICENSE) file.
50 changes: 31 additions & 19 deletions dist/select2-bootstrap4.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/*!
* Select2 Bootstrap4 Theme v1.0.0 (https://github.com/berkan52/select2-bootstrap4-theme)
* Select2 Bootstrap4 Theme v1.0.2 (https://github.com/berkan52/select2-bootstrap4-theme)
*
* A theme for Select2 v4 and Bootstrap 4.0.0-beta.2
* A theme for Select2 v4 and Bootstrap 4.1.1
*
* Release v1.0.0 - 12-12-2017
* Copyright 2017 Berkan Akyürek <[email protected]>
* Release v1.0.2 - 13/05/2018
* Copyright 2017 Berkan Akyürek <[email protected]>
* Latest build by djibe (with autoprefixer)
* Licensed under MIT
*/

.select2-container--bootstrap4 {
display: block;
}
Expand All @@ -32,17 +34,17 @@
outline: 0;
}
.select2-container--bootstrap4 .select2-search__field::-webkit-input-placeholder {
color: #868e96;
color: #6c757d;
}
.select2-container--bootstrap4 .select2-search__field:-moz-placeholder {
color: #868e96;
color: #6c757d;
}
.select2-container--bootstrap4 .select2-search__field::-moz-placeholder {
color: #868e96;
color: #6c757d;
opacity: 1;
}
.select2-container--bootstrap4 .select2-search__field:-ms-input-placeholder {
color: #868e96;
color: #6c757d;
}
.select2-container--bootstrap4 .select2-results__option {
padding: 0.75rem 0.375rem;
Expand All @@ -52,7 +54,7 @@
padding: 0;
}
.select2-container--bootstrap4 .select2-results__option[aria-disabled=true] {
color: #868e96;
color: #6c757d;
cursor: not-allowed;
}
.select2-container--bootstrap4 .select2-results__option[aria-selected=true] {
Expand Down Expand Up @@ -90,19 +92,28 @@
padding-left: 2.25rem;
}
.select2-container--bootstrap4 .select2-results__group {
color: #868e96;
color: #6c757d;
display: block;
padding: 0.75rem 0.375rem;
font-size: 75%;
line-height: 1;
white-space: nowrap;
}
.select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection {
-webkit-transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
border-color: #80bdff;
}
@media screen and (prefers-reduced-motion: reduce) {
.select2-container--bootstrap4.select2-container--focus .select2-selection, .select2-container--bootstrap4.select2-container--open .select2-selection {
-webkit-transition: none;
transition: none;
}
}
.select2-container--bootstrap4.select2-container--open .select2-selection .select2-selection__arrow b {
border-color: transparent transparent #868e96 transparent;
border-color: transparent transparent #6c757d transparent;
border-width: 0 0.25rem 0.25rem 0.25rem;
}
.select2-container--bootstrap4.select2-container--open.select2-container--below .select2-selection {
Expand All @@ -116,7 +127,7 @@
border-top-color: transparent;
}
.select2-container--bootstrap4 .select2-selection__clear {
color: #868e96;
color: #6c757d;
cursor: pointer;
float: right;
font-weight: bold;
Expand Down Expand Up @@ -166,7 +177,7 @@
width: 0.25rem;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
border-color: #868e96 transparent transparent transparent;
border-color: #6c757d transparent transparent transparent;
border-style: solid;
border-width: 0.25rem 0.25rem 0 0.25rem;
height: 0;
Expand All @@ -182,15 +193,16 @@
padding: 0;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
color: #868e96;
color: #6c757d;
}
.select2-container--bootstrap4 .select2-selection--multiple {
min-height: calc(2.25rem + 2px);
padding: 0;
height: auto;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: block;
line-height: 1;
list-style: none;
Expand All @@ -202,7 +214,7 @@
white-space: nowrap;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder {
color: #868e96;
color: #6c757d;
float: left;
margin-top: 5px;
}
Expand All @@ -225,7 +237,7 @@
min-width: 5em;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
color: #868e96;
color: #6c757d;
cursor: pointer;
display: inline-block;
font-weight: bold;
Expand Down Expand Up @@ -306,11 +318,11 @@
margin-top: 1rem;
}
.select2-container--bootstrap4 .select2-selection.input-lg.select2-container--open .select2-selection--single .select2-selection__arrow b {
border-color: transparent transparent #868e96 transparent;
border-color: transparent transparent #6c757d transparent;
border-width: 0 0.3125rem 0.3125rem 0.3125rem;
}
.input-group-lg .select2-container--bootstrap4 .select2-selection.select2-container--open .select2-selection--single .select2-selection__arrow b {
border-color: transparent transparent #868e96 transparent;
border-color: transparent transparent #6c757d transparent;
border-width: 0 0.3125rem 0.3125rem 0.3125rem;
}
.select2-container--bootstrap4[dir="rtl"] .select2-selection--single {
Expand Down
Loading

0 comments on commit 3ba799b

Please sign in to comment.