1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
// Button group
//
// 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.
.BtnGroup {
display: inline-block;
vertical-align: middle;
@include clearfix();
// Proper spacing for multiple button groups (a la, gollum editor)
+ .BtnGroup,
+ .btn {
margin-left: $spacer-1;
}
}
.BtnGroup-item {
position: relative;
float: left;
border-right-width: 0;
border-radius: 0;
&:first-child {
border-top-left-radius: $border-radius;
border-bottom-left-radius: $border-radius;
}
&:last-child {
border-right-width: $border-width;
border-top-right-radius: $border-radius;
border-bottom-right-radius: $border-radius;
}
&.selected,
&[aria-selected=true],
&:focus,
&:active,
&:hover {
border-right-width: $border-width;
+ .BtnGroup-item,
+ .BtnGroup-parent .BtnGroup-item {
border-left-width: 0;
}
}
}
.BtnGroup-parent {
float: left;
&:first-child .BtnGroup-item {
border-top-left-radius: $border-radius;
border-bottom-left-radius: $border-radius;
}
&:last-child .BtnGroup-item {
border-right-width: $border-width;
border-top-right-radius: $border-radius;
border-bottom-right-radius: $border-radius;
}
.BtnGroup-item {
border-right-width: 0;
border-radius: 0;
}
&.selected,
&[aria-selected=true],
&:focus,
&:active,
&:hover {
.BtnGroup-item {
border-right-width: $border-width;
}
+ .BtnGroup-item,
+ .BtnGroup-parent .BtnGroup-item {
border-left-width: 0;
}
}
}
// ensure that the focus ring sits above the adjacent buttons
.BtnGroup-item,
.BtnGroup-parent {
&:focus,
&:active {
z-index: 1;
}
}
|