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

Issues with buttons inside input-groups #23344

Closed
nwoltman opened this issue Aug 11, 2017 · 1 comment
Closed

Issues with buttons inside input-groups #23344

nwoltman opened this issue Aug 11, 2017 · 1 comment
Labels

Comments

@nwoltman
Copy link
Contributor

nwoltman commented Aug 11, 2017

I realized there's a little bit of a problem with my fix in #22612. The CSS for input-group-btn uses negative margins to overlap borders (so there is only 1 border width between buttons) which was fine with a solid border color, but now with translucent borders they combine to make a darker border:

bootstrap-input-group

This could be fixed by removing either the left or right border of buttons inside input-group-btns.

I can submit a PR that does this if this seems like the right way to go. However, there are a couple other issues I'd like to bring up because they can be addressed in the same PR.

First, the current code of input-group-btn seems to try to support the following HTML structures:

<!-- 1 -->
<div class="input-group">
  <div class="input-group-btn">
    <button class="btn" />
  </div>
  <div class="input-group-btn">
    <button class="btn" />
  </div>
</div>

<!-- 2 -->
<div class="input-group">
  <div class="input-group-btn">
    <button class="btn" />
    <button class="btn" />
  </div>
</div>

<!-- 3 -->
<div class="input-group">
  <div class="input-group-btn">
    <div class="btn-group">
      <button class="btn" />
      <button class="btn" />
    </div>
  </div>
</div>

Unfortunately, 2 and 3 are mostly broken right now. Should Bootstrap support all three of these structures?

Finally, @mdo do you think btn-groups should have a translucent border similar to input-groups (as in all the time, even when they're not inside an input-group-btn)? The decision on that will affect the code for handling btn-groups inside input-groups.

Side note: Issue #23006 is related to this.

@mdo
Copy link
Member

mdo commented Aug 18, 2017

Closing as duplicate of #23379.

@mdo mdo closed this as completed Aug 18, 2017
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

3 participants