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

support close button smaller size (or support close button that can be used inside badge) #26669

Closed
rpokrovskij opened this issue Jun 5, 2018 · 9 comments
Labels

Comments

@rpokrovskij
Copy link

That is how close button looks inside badge:

https://codepen.io/rpokrovskij/pen/YvWPQG

there are no standard way to change size, verticaly align and inverse color. I propose to add a standard support of close button inside badge case or add standard classes to allow users manipulate close button.

@ahtee
Copy link

ahtee commented Jun 7, 2018

I was under the impression that a badge was something to promote, like this is a NEW site, feature, or branding, possibly new release.. Why would you want to dismiss the badge?

@rpokrovskij
Copy link
Author

rpokrovskij commented Jun 7, 2018

@ahtee may be you miss that I'm talkin about badge that is bs4 class ? I'm sorry for that.
there are tasks when you need to add and remove badges/labels through UI. e.g. stackoverflow tags

image

Inside codepen there was another sample : https://dashboardcode.github.io/BsMultiSelect/
There I want to combine several BS components " form-control, badge, close button, dropdown-menu " to build lightwieght, "themes-transparent" (means no own css) multi select (trying to use BS as a lego).
I'm an author of this plugin and sharing my experience with bootstrap team.

It would be good to have BS flexible enough to build multiselect plugins without CSS, only using classes (and js). Actually BS is close to it. "close button inside badge" is most "strange" requirement, other three are just small improvements
2) add min-height to .form-control (to prevent empty div.form-control collapse)
3) add disable and focus styling through classes like BS do it for buttons: there are btn:disable and btn.disable; so I need the same for form-control: add form-control.disable to already exist form-control:disable
4) add possibility to set input-color as class ( the filter's input should be "transparent" no border, no outline so can't be form-contlor, but should have form-control's color ; and you know what? bs publish all those primary-secondary colors as classes but do not publish input color and it is not just black).

Of course plugin works right now, and when you copy its SCSS https://github.com/DashboardCode/BsMultiSelect/blob/master/scss/BsMultiSelect.scss to you your project "adaptation to the BS theme" will be automatic (I hope), since scss use BS variables but still it would be so nice to have such complex plugin runned only on "bs classes" and without need of CSS or SCSS. Just four little (and natural) additions and it become possible.

@ahtee
Copy link

ahtee commented Jun 7, 2018

ah now I see what you mean. thanks for explaining for me and for anyone else who may wonder the same

@rpokrovskij
Copy link
Author

@ahtee , thank you for your interest

@Joyrex
Copy link

Joyrex commented Jun 7, 2018

If you're using FontAwesome, you can use the (in my opinion) superior "X" icon which scales better.

@rpokrovskij
Copy link
Author

@Joyrex "X button" depends on current theme and this is good.

see how nice it works with bootswatch sketchy theme:
https://dashboardcode.github.io/BsMultiSelect/indexsketchy.html

There are no code that style close button font there. I get it from theme and it works. (And I would like to have the same beaty with button size and aligment.

@Johann-S
Copy link
Member

@rpokrovskij please can you update to our v4.1.1 release ?

@rpokrovskij
Copy link
Author

@Johann-S if you talking about codepen - done

@mdo
Copy link
Member

mdo commented Jul 9, 2018

Should come with #26823 for badges.

@mdo mdo closed this as completed Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants