Comments (12)
this fork is compatible with boostrap 5.3.1: https://github.com/g10f/select2-bootstrap-5-theme.git
Edit: By working I mean that you need to compile the scss from the fork.
would love to see this merged into the main repo
from select2-bootstrap-5-theme.
You can just patch it like this :
$s2bs5-border-color: $border-color;
@import "select2-bootstrap-5-theme/src/include-all";
from select2-bootstrap-5-theme.
Replacing original color with red one is not a good solution.
Tracing $s2bs5-border-color
assignments would get this chain:
$s2bs5-border-color = $form-select-border-color = $input-border-color = $border-color
So correct quick fix is to add this line before importing select2-bootstrap-5-theme
:
$s2bs5-border-color: $border-color;
from select2-bootstrap-5-theme.
"Quick fix"
Change in node_modules/select2-bootstrap-5-theme/src/_variables.scss from
$s2bs5-clear-icon: str-replace($btn-close-bg, #{$btn-close-color}, #{shade-color($s2bs5-border-color, 50%)}) !default;
to:
$s2bs5-clear-icon: str-replace($btn-close-bg, #{$btn-close-color}, #{shade-color(red, 50%)}) !default;
from select2-bootstrap-5-theme.
@apalfrey any chance this could be fixed in a release?
from select2-bootstrap-5-theme.
Always broken in Bootstrap 5.3.2
from select2-bootstrap-5-theme.
Same issue with:
bootstrap: 5.3.0-alpha3
select2: 4.1.0-rc.0
bootstrap-5-theme: 1.3.0
from select2-bootstrap-5-theme.
Same here with 5.3.0 release, could you please publish a new release with the minor fix suggested by @LocalHeroPro (it works like a charm) ?
from select2-bootstrap-5-theme.
I just ran into this issue myself. Instead of editing the package files, I set the variable myself before including the package:
$s2bs5-border-color: red;
@import '~select2-bootstrap-5-theme';
from select2-bootstrap-5-theme.
With bootstrap 5.3.1
and select2 4.1.0-rc.0
this is completely broken
$('#edtText').select2({
theme: "bootstrap-5",
width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : 'style',
placeholder: $(this).data('placeholder'),
});
<div class="col-2">
<input type="text" class="form-control" value="text" />
<div class="debug-border"></div>
<select type="text" class="form-control debug-border" id="edtText"></select>
<div class="debug-border"></div>
</div>
(debug-border
) is just a dashed pink border to show boundaries of the control and code is from sample in Single select from document
attempted fixing css with replacing background-color:white
with background-color:var(--bs-secondary-bg);
and it looks better but the width is still broken and select is hidden too
from select2-bootstrap-5-theme.
Related Issues (20)
- Any solution to this problem? HOT 2
- select2 on modal window HOT 2
- Floating Label - Multi Select Box HOT 2
- Validation icons HOT 1
- Dark mode HOT 6
- input not focus on mobile (iphone) HOT 4
- select2-bootstrap-5-theme@npm:1.2.0 doesn't provide @popperjs/core (p36ae4), requested by bootstrap HOT 2
- The magnifying glass image and the CSS to display it seem to be missing from all the v4 e v5 themes. HOT 1
- Minor CSS change in Bootstrap 5.2.0 HOT 2
- Comatibility issue with Django-autocomplete-light. Clear button not appearing. HOT 1
- Repo "About"
- Yarn warning with @popperjs/core
- Error after upgrade to "Bootstrap 5.2.3" HOT 1
- Autofocus is not working in [email protected] HOT 2
- SCSS Floating Labels
- select2-bootstrap-5-theme with ajax lost the style HOT 1
- Add pls support dark theme bootstrap 5.3 and floating label HOT 1
- Could someone add support for small images HOT 1
- https://cdn.jsdelivr.net/npm/[email protected]/+esm
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-bootstrap-5-theme.