Comments (5)
@morrow95 Thanks for your feedback. But this is just your own project specific customization, isn't this? Or are there any general problems?
from select2-bootstrap4-theme.
@ttskch i also had to change the rules a bit. the variables used by @morrow95 are from bootstrap.
this is my full code:
@import '~bootstrap/scss/functions';
@import '~bootstrap/scss/variables';
@import '~bootstrap/scss/mixins';
@import '~select2';
@import '~@ttskch/select2-bootstrap4-theme/dist/select2-bootstrap4.css';
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered
{
display: block !important;
padding: 0 $input-padding-x calc(#{$input-padding-y} - 1px) $input-padding-x !important;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice
{
margin-top: calc(#{$input-padding-y} - 1px);
}
.select2-container--bootstrap4.select2-container--focus.select2-container--open .select2-selection
{
border-bottom: 1px solid $gray-400 !important;
}
from select2-bootstrap4-theme.
@drjele I don't know why your modifications are needed. Could you please show some problem reproducing html?
from select2-bootstrap4-theme.
my modifications fix two things for a multiple select with ajax:
- i see a black line at the bottom when the choice list disapears, only during the transition.
- when i select the first option the row height of the select2 control grows by one pixel.
i posted my modifications just to show that what @morrow95 says it is posible and useful .. to use the variables from the bootstrap scss, since most people using this theme also use the bootstrap css.
and one more trick .. you can create a file with all the imports and than use that where you need it.
from select2-bootstrap4-theme.
@morrow95 thanks for your fix, I also added:
This fix border and radius between search input and results list.
.select2-container--bootstrap4.select2-container--open .select2-selection {
border-bottom: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
and this make the select more responsive:
.select2-container--bootstrap4 {
font-size: $font-size-base !important;
width: 100% !important;
}
from select2-bootstrap4-theme.
Related Issues (20)
- Bootstrap variable file should not be introduced in layout.css HOT 3
- Unable to use modified bootstrap $primary variable HOT 7
- Weird issue with search not showing complete placeholder. HOT 1
- Design changes in upcoming Select2 4.1.0 release HOT 5
- [Suggestion] add a variables file, allow modifying the variables used in the scss files HOT 2
- Select padding pulled from wrong Bootstrap variable HOT 1
- 15 commits of 2020-04-24 waiting for release 1.3.3 on master? HOT 2
- BS Theme not working on js-example-tags HOT 1
- Styling is missing Disabled options HOT 3
- Use custom-select-% variable instead of input HOT 2
- Typo in README.md
- Module not found HOT 1
- Styling of dropdown icon does not match BS4 default HOT 2
- Bootstrap 5 theme incoming any time soon? HOT 8
- select2 multiple select dropdown css issue HOT 3
- cannot use allowclear HOT 2
- Select2 Multiple Tagging Support HOT 2
- Invalid layout on multiple select and input-group HOT 3
- Select2 Bootstrap4 not working with lazy loading
- Deprecation Warnings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from select2-bootstrap4-theme.