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

button-group: no border-radius when containing only one button #44

Open
developit opened this issue Oct 19, 2015 · 3 comments
Open

button-group: no border-radius when containing only one button #44

developit opened this issue Oct 19, 2015 · 3 comments
Labels

Comments

@developit
Copy link
Contributor

Placing a single <button> into a button-group causes it to render without any border-radius.

Here's my current fix:

.btn-group > .btn:first-child:last-child {
    border-radius: 4px;
}
@kevinmartin
Copy link

Or change:

  > .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  > .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  > .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
  }

to:

  > .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  > .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

Also has the added benefit of being 2 selectors, not 3.

Pen with updated code: http://codepen.io/KevinMartin/pen/KdZPLJ

@kevinmartin
Copy link

Ill make a PR now

@developit
Copy link
Contributor Author

Ah good call.

@connors connors added the css label Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants