Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 5 additions & 0 deletions modules/primer-buttons/lib/button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
//
// A button group is a series of buttons laid out next to each other, all part
// of one visual button, but separated by rules to be separate.
@warn ".BtnGroup-form will be deprecated in version 11. Use .BtnGroup-parent instead.";

.BtnGroup {
display: inline-block;
vertical-align: middle;
Expand Down Expand Up @@ -38,12 +40,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 +76,7 @@
}

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