@@ -33,29 +33,12 @@ const StyledButtonBar = styled('div')<{gap: ValidSize | 0; merged: boolean}>`
33
33
z-index : 2 ;
34
34
}
35
35
36
- & > div : not (: last-child ) > button {
37
- border-top-right-radius : 0 ;
38
- border-bottom-right-radius : 0 ;
39
- }
40
-
41
- & > div : not (: first-child ) > button {
42
- border-top-left-radius : 0 ;
43
- border-bottom-left-radius : 0 ;
44
- margin-left : -1px ;
45
- }
46
-
47
- & > div : not (: first-child ): not (: last-child ) > button {
48
- margin-left : -1px ;
49
- }
50
-
51
- & > .dropdown ,
52
- & > button ,
53
- & > input ,
54
- & > a {
36
+ & > * {
55
37
position : relative;
56
38
57
39
/* First button is square on the right side */
58
- & : first-child : not (: last-child ) {
40
+ & : first-child : not (: last-child ),
41
+ & : first-child : not (: last-child ) > button {
59
42
border-top-right-radius : 0 ;
60
43
border-bottom-right-radius : 0 ;
61
44
@@ -66,7 +49,8 @@ const StyledButtonBar = styled('div')<{gap: ValidSize | 0; merged: boolean}>`
66
49
}
67
50
68
51
/* Middle buttons are square */
69
- & : not (: last-child ): not (: first-child ) {
52
+ & : not (: last-child ): not (: first-child ),
53
+ & : not (: last-child ): not (: first-child ) > button {
70
54
border-radius : 0 ;
71
55
72
56
& > .dropdown-actor > ${ StyledButton } {
@@ -75,24 +59,14 @@ const StyledButtonBar = styled('div')<{gap: ValidSize | 0; merged: boolean}>`
75
59
}
76
60
77
61
/* Middle buttons only need one border so we don't get a double line */
78
- & : first-child {
79
- & + .dropdown : not (: last-child ),
80
- & + a : not (: last-child ),
81
- & + input : not (: last-child ),
82
- & + button : not (: last-child ) {
83
- margin-left : -1px ;
84
- }
62
+ & : first-child + * : not (: last-child ) {
63
+ margin-left : -1px ;
85
64
}
86
65
87
66
/* Middle buttons only need one border so we don't get a double line */
88
67
/* stylelint-disable-next-line no-duplicate-selectors */
89
- & : not (: last-child ): not (: first-child ) {
90
- & + .dropdown ,
91
- & + button ,
92
- & + input ,
93
- & + a {
94
- margin-left : -1px ;
95
- }
68
+ & : not (: last-child ): not (: first-child ) + * {
69
+ margin-left : -1px ;
96
70
}
97
71
98
72
/* Last button is square on the left side */
@@ -101,6 +75,7 @@ const StyledButtonBar = styled('div')<{gap: ValidSize | 0; merged: boolean}>`
101
75
border-bottom-left-radius : 0 ;
102
76
margin-left : -1px ;
103
77
78
+ & > button ,
104
79
& > .dropdown-actor > ${ StyledButton } {
105
80
border-top-left-radius : 0 ;
106
81
border-bottom-left-radius : 0 ;
0 commit comments