Skip to content
Merged
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
36 changes: 23 additions & 13 deletions modules/primer-buttons/lib/button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// Proper spacing for multiple button groups (a la, gollum editor)
+ .BtnGroup,
+ .btn {
margin-left: 5px;
margin-left: $spacer-1;
}
}

Expand All @@ -23,21 +23,21 @@
border-radius: 0;

&:first-child {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border-top-left-radius: $border-radius;
border-bottom-left-radius: $border-radius;
}

&:last-child {
border-right-width: 1px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-right-width: $border-width;
border-top-right-radius: $border-radius;
border-bottom-right-radius: $border-radius;
}

&.selected,
&:focus,
&:active,
&:hover {
border-right-width: 1px;
border-right-width: $border-width;

+ .BtnGroup-item,
+ .BtnGroup-parent .BtnGroup-item,
Expand All @@ -52,14 +52,14 @@
float: left;

&:first-child .BtnGroup-item {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border-top-left-radius: $border-radius;
border-bottom-left-radius: $border-radius;
}

&:last-child .BtnGroup-item {
border-right-width: 1px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-right-width: $border-width;
border-top-right-radius: $border-radius;
border-bottom-right-radius: $border-radius;
}

.BtnGroup-item {
Expand All @@ -72,7 +72,7 @@
&:active,
&:hover {
.BtnGroup-item {
border-right-width: 1px;
border-right-width: $border-width;
}

+ .BtnGroup-item,
Expand All @@ -82,3 +82,13 @@
}
}
}

// ensure that the focus ring sits above the adjacent buttons
.BtnGroup-item,
.BtnGroup-parent,
.BtnGroup-form {
&:focus,
&:active {
z-index: 1;
}
}