assets/stylesheets/bootstrap/_button-group.scss in bootstrap-4.0.0.alpha3 vs assets/stylesheets/bootstrap/_button-group.scss in bootstrap-4.0.0.alpha3.1
- old
+ new
@@ -1,5 +1,7 @@
+// scss-lint:disable QualifyingElement
+
// Make the div behave like a button
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-block;
@@ -31,22 +33,22 @@
}
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
- margin-left: -5px; // Offset the first child's margin
+ margin-left: -$btn-toolbar-margin; // Offset the first child's margin
@include clearfix();
.btn-group,
.input-group {
float: left;
}
> .btn,
> .btn-group,
> .input-group {
- margin-left: 5px;
+ margin-left: $btn-toolbar-margin;
}
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
@@ -100,24 +102,34 @@
//
// Split button dropdowns
//
-// Give the line between buttons some depth
-.btn-group > .btn + .dropdown-toggle {
- padding-right: 8px;
- padding-left: 8px;
+.btn + .dropdown-toggle-split {
+ padding-right: $btn-padding-x * .75;
+ padding-left: $btn-padding-x * .75;
+
+ &::after {
+ margin-left: 0;
+ }
}
-.btn-group > .btn-lg + .dropdown-toggle {
- padding-right: 12px;
- padding-left: 12px;
+
+.btn-sm + .dropdown-toggle-split {
+ padding-right: $btn-padding-x-sm * .75;
+ padding-left: $btn-padding-x-sm * .75;
}
+.btn-lg + .dropdown-toggle-split {
+ padding-right: $btn-padding-x-lg * .75;
+ padding-left: $btn-padding-x-lg * .75;
+}
+
+
// The clickable button for toggling the menu
// Remove the gradient and set the same inset shadow as the :active state
.btn-group.open .dropdown-toggle {
- @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
+ @include box-shadow($btn-active-box-shadow);
// Show no shadow for `.btn-link` since it has no other button styles.
&.btn-link {
@include box-shadow(none);
}
@@ -175,14 +187,12 @@
.btn-group-vertical > .btn {
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
&:first-child:not(:last-child) {
- border-top-right-radius: $btn-border-radius;
@include border-bottom-radius(0);
}
&:last-child:not(:first-child) {
- border-bottom-left-radius: $btn-border-radius;
@include border-top-radius(0);
}
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;