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

CSS Conflict with vue-bootstrap/bootstrap4 #662

Closed
soichih opened this issue Sep 26, 2018 · 12 comments
Closed

CSS Conflict with vue-bootstrap/bootstrap4 #662

soichih opened this issue Sep 26, 2018 · 12 comments

Comments

@soichih
Copy link

soichih commented Sep 26, 2018

I am using vue-select to replace vue-bootstrap default select box. I believe this issue started when I upgraded vue-bootstrap to 2.0 (which loads bootstrap 4.1.1), but vue-select stying seems to be broken with the version I am using (v2.5.1)

screenshot from 2018-09-25 23-25-19

(See the odd caret mark on the right side of the select box, and the height of the select box seems unnecessarily bloated..)

I am loading bootstrap css like so..

import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap-vue/dist/bootstrap-vue.min.css'

If I remove these, the issue goes away.
screenshot from 2018-09-25 23-34-11

I am not sure if this is vue-bootstrap issue, but is there anyway to make vue-select not conflict with vue-bootstrap?

@soichih
Copy link
Author

soichih commented Sep 26, 2018

I've patched this issue with following CSS rules for now

 /*prevent bootstrap-vue css conflict*/
.v-select.dropdown .dropdown-toggle::after {
content: inherit;
}
.v-select.dropdown .form-control {
height: inherit;
}

soichih added a commit to brainlife/warehouse that referenced this issue Sep 26, 2018
@bakatz
Copy link

bakatz commented Oct 1, 2018

Having the same issue - above CSS did not fix it for me (possibly because I'm on multiselect mode). For now, I've downgraded to 2.4.0 specifically, which works fine but requires some other CSS hacks.

@DjeeBay
Copy link

DjeeBay commented Oct 1, 2018

In my case the following did the trick. But not sure it is the best way to do it :

.v-select.dropdown .dropdown-toggle::after { display: none; }

@franciscotrillo
Copy link

I've patched this issue with following CSS rules for now

 /*prevent bootstrap-vue css conflict*/
.v-select.dropdown .dropdown-toggle::after {
content: inherit;
}
.v-select.dropdown .form-control {
height: inherit;
}

I had to use content: normal; instead of content: inherit;

@chrislebaron
Copy link

CSS fix did not work for me either, but downgrading to 2.4.0 did the trick.

@tranghaviet
Copy link

I've patched this issue with following CSS rules for now

 /*prevent bootstrap-vue css conflict*/
.v-select.dropdown .dropdown-toggle::after {
content: inherit;
}
.v-select.dropdown .form-control {
height: inherit;
}

this work perfectly, thanks.

@sreenadh
Copy link

The following CSS rules solved my issue.

.v-select.dropdown .dropdown-toggle::after {
    content: normal !important;
}
.dropdown .dropdown-menu
{
    transform: scale(1, 1) !important;
}

@sagalbot sagalbot mentioned this issue Feb 17, 2019
23 tasks
@Davroniy
Copy link

how to downgrade to version 2.4.0?

@Davroniy
Copy link

Having the same issue - above CSS did not fix it for me (possibly because I'm on multiselect mode). For now, I've downgraded to 2.4.0 specifically, which works fine but requires some other CSS hacks.

How to downgrade to that version?

@sagalbot
Copy link
Owner

sagalbot commented Mar 23, 2019

This is generally caused by the class name collisions. From the start I wrote vue-select to depend on bootstrap, but moved away from that in 2.0 and aimed for compatibility instead. I left the classnames the same however, and that was a mistake. In v3, all classnames are unique and prefixed with vs__.

I'm looking to release a beta of v3 today, and I'll take a few mins now to see if I can quickly patch this up in a 2.6.3 release.

@sagalbot
Copy link
Owner

sagalbot commented Mar 23, 2019

Fixed with #796 and released in v2.6.3.

Thanks @soichih for posting your solution, I added almost exactly that to the codebase.

@Davroniy recommend upgrading to 2.6.3 now instead of downgrading as there as many other fixes in 2.6.

@Davroniy
Copy link

Davroniy commented Mar 24, 2019

@sagalbot it (version 2.6.3) has another issue with carrot icon on the right up corner

Update: sorry, it got solved in version 2.6.3/ Yesterday it had problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants