Skip to content

Commit

Permalink
Add .BtnGroup-parent
Browse files Browse the repository at this point in the history
  • Loading branch information
muan committed Jul 2, 2018
1 parent c8cab2f commit 4fe1a4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/primer-buttons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ Have a hankering for a series of buttons that are attached to one another? Wrap
</div>
```

Add `.BtnGroup-form` to `<form>`s within `.BtnGroup`s for proper spacing and rounded corners.
Add `.BtnGroup-parent` to parent elements, like `<form>`s or `<details>`s, within `.BtnGroup`s for proper spacing and rounded corners.

```html
<div class="BtnGroup">
<button class="btn BtnGroup-item" type="button">Button</button>
<form class="BtnGroup-form">
<form class="BtnGroup-parent">
<button class="btn BtnGroup-item" type="button">Button in a form</button>
</form>
<button class="btn BtnGroup-item" type="button">Button</button>
Expand Down
3 changes: 3 additions & 0 deletions modules/primer-buttons/lib/button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@
border-right-width: 1px;

+ .BtnGroup-item,
+ .BtnGroup-parent .BtnGroup-item,
+ .BtnGroup-form .BtnGroup-item {
border-left-width: 0;
}
}
}

.BtnGroup-parent,
.BtnGroup-form {
float: left;

Expand Down Expand Up @@ -72,6 +74,7 @@
}

+ .BtnGroup-item,
+ .BtnGroup-parent .BtnGroup-item,
+ .BtnGroup-form .BtnGroup-item {
border-left-width: 0;
}
Expand Down

0 comments on commit 4fe1a4c

Please sign in to comment.