From 6aea130a7bdc020d9ff2792960eebdc1f611bfd5 Mon Sep 17 00:00:00 2001 From: Luiz Filipe Machado Barni Date: Sun, 30 Oct 2016 10:58:36 -0200 Subject: [PATCH 1/2] real input-group support These will provide input-group styling support without extra trash classes. --- src/select2-bootstrap.scss | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/select2-bootstrap.scss b/src/select2-bootstrap.scss index c6d7967..98ac510 100755 --- a/src/select2-bootstrap.scss +++ b/src/select2-bootstrap.scss @@ -773,18 +773,22 @@ $s2bs-form-control-transition: border-color ease-in-out .15s, box-shadow ease-in } } -.input-group.select2-bootstrap-prepend .select2-container--bootstrap { - .select2-selection { +/** + * Input group styles, without extra classes. + * @author odahcam + */ +.input-group > .select2-container--bootstrap { + &:first-child > .selection > .select2-selection { @include border-left-radius(0); } -} - -.input-group.select2-bootstrap-append .select2-container--bootstrap { - .select2-selection { + &:not(:first-child):not(:last-child) { + border-radius: 0; + } + &:last-child > .selection > .select2-selection { @include border-right-radius(0); } } - + /** * Adjust alignment of Bootstrap buttons in Bootstrap Input Groups to address * Multi Select2's height which - depending on how many elements have been selected - From fa2023b18211e2e9683d8ee2c822293780990244 Mon Sep 17 00:00:00 2001 From: Luiz Filipe Machado Barni Date: Sun, 30 Oct 2016 12:07:25 -0200 Subject: [PATCH 2/2] Update select2-bootstrap.scss --- src/select2-bootstrap.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/select2-bootstrap.scss b/src/select2-bootstrap.scss index 98ac510..047e144 100755 --- a/src/select2-bootstrap.scss +++ b/src/select2-bootstrap.scss @@ -779,13 +779,13 @@ $s2bs-form-control-transition: border-color ease-in-out .15s, box-shadow ease-in */ .input-group > .select2-container--bootstrap { &:first-child > .selection > .select2-selection { - @include border-left-radius(0); + @include border-right-radius(0); } &:not(:first-child):not(:last-child) { border-radius: 0; } &:last-child > .selection > .select2-selection { - @include border-right-radius(0); + @include border-left-radius(0); } }