Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add .BtnGroup-parent
  • Loading branch information
muan committed Jul 2, 2018
commit 4fe1a4cdea1917a2e468eb84e7124ad44ebea0e9
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