mirror of
https://github.com/primer/css.git
synced 2024-12-01 12:42:32 +03:00
Merge pull request #522 from muan/btn-form
Add .BtnGroup-parent, deprecate .BtnGroup-form
This commit is contained in:
commit
30c31f907c
@ -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>
|
||||
|
@ -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;
|
||||
@ -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;
|
||||
|
||||
@ -72,6 +76,7 @@
|
||||
}
|
||||
|
||||
+ .BtnGroup-item,
|
||||
+ .BtnGroup-parent .BtnGroup-item,
|
||||
+ .BtnGroup-form .BtnGroup-item {
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user