Skip to content

Commit 44346c7

Browse files
committed
fix(button-group): rtl margin and border-radius
1 parent 08d9aca commit 44346c7

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

scss/_button-group.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// stylelint-disable selector-no-qualifying-type
2+
3+
*[dir="rtl"] {
4+
.btn-group {
5+
// Prevent double borders when buttons are next to each other
6+
> .btn:not(:first-child),
7+
> .btn-group:not(:first-child) {
8+
margin-right: -$btn-border-width;
9+
}
10+
11+
// Reset rounded corners
12+
> .btn:not(:last-child):not(.dropdown-toggle),
13+
> .btn-group:not(:last-child) > .btn {
14+
@include border-radius($border-radius, 0);
15+
@include border-left-radius(0);
16+
}
17+
18+
> .btn:not(:first-child),
19+
> .btn-group:not(:first-child) > .btn {
20+
@include border-radius($border-radius, 0);
21+
@include border-right-radius(0);
22+
}
23+
24+
> .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
25+
@include border-left-radius(0);
26+
@include border-right-radius(0);
27+
}
28+
}
29+
}

scss/coreui.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
@import "breadcrumb";
3030
@import "brand-card";
3131
@import "brand-buttons";
32+
@import "button-group";
3233
@import "buttons";
3334
@import "callout";
3435
@import "card";

0 commit comments

Comments
 (0)