Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: bootstrap 5.3 styles bug #754

Open
Datzu712 opened this issue Aug 8, 2024 · 4 comments
Open

[Bug]: bootstrap 5.3 styles bug #754

Datzu712 opened this issue Aug 8, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Datzu712
Copy link

Datzu712 commented Aug 8, 2024

Bug description

I'm using bootstrap 5.3.3 with tom select 2.3.1 and when I try to create a select, there is a strange box around the select:
image

Expected behavior

I think it should look something like this for example:
image

Steps to reproduce

You can check what I mean here:
https://codepen.io/Datzu712/pen/zYVdRvo?editors=1000
image

I realized what happens when you put the form-select class in it that weird border appears

Additional context

  • OS: Ubuntu
  • Browser: chrome
  • Version chrome 127.0.6533.99 / ubuntu 22
  • Device: ?
@Datzu712 Datzu712 added the bug Something isn't working label Aug 8, 2024
@xJuvi
Copy link

xJuvi commented Aug 11, 2024

Hey
it's not a bug. Your use the regular Theme. For bootstrap add bootstrap5 to the css link. You can find the alternative theme files (bootstrap) in the dist folder on jsdelivr.

After changing the css file to the correct one the select looks like expected.

Kind regards.

@body-clock
Copy link

Yeah, I think the Styling Examples page on the main site is a little confusing. I don't really understand what it's trying to communicate. Left column with no item styling and right column with item styling? I ran into this same behavior when I was attempting to style with Bootstrap 5. Just import the bootstrap theme CSS instead of the main CSS and you should be good.

@xJuvi
Copy link

xJuvi commented Aug 12, 2024

The styling example only show the results from different bootstrap options. The key point which solce your problem is to change the main css against the bootstrap5 css - otherwise the bootstrap styling doesn't take effect.

@body-clock
Copy link

Yeah, I'm aware - you may be responding to OP and not me, but I do think it's worth mentioning that the styling page leads a new user to believe that they can add these classes to apply the Bootstrap theming. I think, since both me and the other user ran into this issue, there is an opportunity to improve the docs/language on that page to better communicate how to style Tom Select with Bootstrap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants