Skip to content

btn-group-vertical gaps with toggle buttons #20298

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

Closed
bpierson opened this issue Jul 13, 2016 · 4 comments
Closed

btn-group-vertical gaps with toggle buttons #20298

bpierson opened this issue Jul 13, 2016 · 4 comments

Comments

@bpierson
Copy link

btn-group-vertical leaves gaps when used with label-style toggle buttons. On the left is standard vertical group, followed by checkbox and radio versions:

btn-group-vertical_1

<div class="btn-group-vertical" data-toggle="buttons" role="group">
    <label class="btn-secondary btn">
        <input type="checkbox" /> One
    </label>
    <label class="btn-secondary btn">
        <input type="checkbox" /> Two
    </label>
    <label class="btn-secondary btn">
        <input type="checkbox" /> Three
    </label>
</div>
@wolfy1339
Copy link
Contributor

I don't think that class is designed to be used with label

@bpierson
Copy link
Author

Possibly. Switching from label to something non-semantic like span seems to fix the problem. The docs use label for toggle buttons. The following works:

<div class="btn-group-vertical" data-toggle="buttons">
    <span class="btn-secondary btn">
        <input type="checkbox" /> One
    </span>
    <span class="btn-secondary btn">
        <input type="checkbox" /> Two
    </span>
    <span class="btn-secondary btn">
        <input type="checkbox" /> Three
    </span>
</div>

@cvrebert
Copy link
Collaborator

Did you test against v4.0.0-alpha.2, or against the v4-dev branch?

@bpierson
Copy link
Author

It's the dev branch. I learned that lesson on the first issue that I opened. =c)

@mdo mdo modified the milestone: v4.0.0-alpha.4 Jul 28, 2016
mdo added a commit that referenced this issue Oct 3, 2016
- Fixes #20298 for vertical button group spacing
- Fixes #20784 for horizontal (default) button group spacing
- Alternate fix to #20823 which only applied a fix for vertical button groups
@mdo mdo closed this as completed in #20827 Oct 3, 2016
twbs-savage pushed a commit to twbs-savage/bootstrap that referenced this issue Oct 3, 2016
- Fixes twbs#20298 for vertical button group spacing
- Fixes twbs#20784 for horizontal (default) button group spacing
- Alternate fix to twbs#20823 which only applied a fix for vertical button groups
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

4 participants