liuxiaolong
2019-05-06 acc45d2ece02563964d7b8a22ff0c40bd8358889
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Button groups
//
 
@if not $material-style {
  :not(.btn-group) > .btn-group > .btn:not(.btn-default):not([class*="btn-outline-"]):first-child,
  .btn-group > .btn-group:first-child > .btn:not(.btn-default):not([class*="btn-outline-"]):first-child,
  .input-group-prepend > .btn:not(.btn-default):not([class*="btn-outline-"]):first-child,
  .input-group-append > .btn:not(.btn-default):not([class*="btn-outline-"]):first-child {
    @include ltr-style {
      border-left-color: transparent !important;
    }
    @include rtl-style {
      border-right-color: transparent !important;
    }
  }
 
  :not(.btn-group) > .btn-group > .btn:not(.btn-default):not([class*="btn-outline-"]):last-child,
  .btn-group > .btn-group:last-child > .btn:not(.btn-default):not([class*="btn-outline-"]):last-child,
  :not(.btn-group) > .btn-group > .dropdown-toggle:not(.btn-default):not([class*="btn-outline-"]),
  .btn-group > .btn-group:last-child > .dropdown-toggle:not(.btn-default):not([class*="btn-outline-"]),
  .input-group-prepend > .btn:not(.btn-default):not([class*="btn-outline-"]):last-child,
  .input-group-append > .btn:not(.btn-default):not([class*="btn-outline-"]):last-child,
  .input-group-prepend > .dropdown-toggle:not(.btn-default):not([class*="btn-outline-"]),
  .input-group-append > .dropdown-toggle:not(.btn-default):not([class*="btn-outline-"]) {
    @include ltr-style {
      border-right-color: transparent !important;
    }
    @include rtl-style {
      border-left-color: transparent !important;
    }
  }
}
 
// *******************************************************************************
// * Sizing
 
.btn-group-xs > .btn {
  @extend .btn-xs;
}
 
.btn-group-sm > .btn {
  font-size: $input-btn-font-size-sm;
}
 
.btn-group-lg > .btn {
  font-size: $input-btn-font-size-lg;
}
 
.btn-group-xl > .btn {
  @extend .btn-xl;
}
 
// *******************************************************************************
// * Split button
 
.dropdown-toggle-split,
.btn-lg + .dropdown-toggle-split,
.btn-group-lg > .btn + .dropdown-toggle-split,
.input-group-lg .btn + .dropdown-toggle-split,
.btn-xl + .dropdown-toggle-split,
.btn-group-xl > .btn + .dropdown-toggle-split {
  padding-right: .7em;
  padding-left: .7em;
}
 
.btn-sm + .dropdown-toggle-split,
.btn-group-sm > .btn + .dropdown-toggle-split,
.input-group-sm .btn + .dropdown-toggle-split {
  padding-right: .6em;
  padding-left: .6em;
}
 
.btn-xs + .dropdown-toggle-split,
.btn-group-xs > .btn + .dropdown-toggle-split {
  padding-right: .5em;
  padding-left: .5em;
}
 
// *******************************************************************************
// * RTL
 
@include rtl-only {
  .btn-group .btn:not(.btn-round) {
    @include border-radius($border-radius !important);
  }
 
  .btn-group .btn-xs:not(.btn-round),
  .btn-group-xs .btn:not(.btn-round) {
    @include border-radius($border-radius-xs !important);
  }
 
  .btn-group .btn-sm:not(.btn-round),
  .btn-group-sm .btn:not(.btn-round) {
    @include border-radius($border-radius-sm !important);
  }
 
  .btn-group .btn-lg:not(.btn-round),
  .btn-group-lg .btn:not(.btn-round) {
    @include border-radius($border-radius-lg !important);
  }
 
  .btn-group .btn-xl:not(.btn-round),
  .btn-group-xl .btn:not(.btn-round) {
    @include border-radius($border-radius-xl !important);
  }
 
  .btn-group {
    .btn + .btn,
    .btn + .btn-group,
    .btn-group + .btn,
    .btn-group + .btn-group {
      margin-right: -$input-btn-border-width;
      margin-left: 0;
    }
 
    > .btn:first-child {
      margin-left: 0;
    }
 
    > .btn:not(:last-child):not(.dropdown-toggle),
    > .btn-group:not(:last-child) > .btn {
      @include border-left-radius(0 !important);
    }
 
    > .btn:not(:first-child),
    > .btn-group:not(:first-child) > .btn {
      @include border-right-radius(0 !important);
    }
  }
 
  .btn-group-vertical {
    .btn:not([class*=btn-outline]) {
      border-right-color: transparent !important;
      border-left-color: transparent !important;
    }
 
    > .btn:not(:first-child):not(:last-child),
    > .btn-group:not(:first-child):not(:last-child) > .btn {
      border-radius: 0 !important;
    }
 
    > .btn-group:first-child:not(:last-child) > .btn {
      @include border-bottom-radius(0 !important);
    }
 
    > .btn-group:last-child:not(:first-child) > .btn {
      @include border-top-radius(0 !important);
    }
  }
}