2017-10-02 23:34:56 -04:00
|
|
|
// stylelint-disable selector-no-qualifying-type
|
2016-02-06 15:28:18 -05:00
|
|
|
|
2012-01-07 06:45:24 -05:00
|
|
|
// Make the div behave like a button
|
2013-05-09 19:26:35 -04:00
|
|
|
.btn-group,
|
|
|
|
.btn-group-vertical {
|
2012-01-07 06:45:24 -05:00
|
|
|
position: relative;
|
2017-01-03 22:22:08 -05:00
|
|
|
display: inline-flex;
|
2012-08-27 15:05:15 -04:00
|
|
|
vertical-align: middle; // match .btn alignment given font-size hack above
|
2014-12-02 17:02:35 -05:00
|
|
|
|
2012-12-21 03:50:28 -05:00
|
|
|
> .btn {
|
2013-03-01 00:19:02 -05:00
|
|
|
position: relative;
|
2016-12-22 02:29:16 -05:00
|
|
|
flex: 0 1 auto;
|
2014-12-02 17:02:35 -05:00
|
|
|
|
2017-06-03 03:53:50 -04:00
|
|
|
// Bring the hover, focused, and "active" buttons to the front to overlay
|
2016-12-22 02:29:16 -05:00
|
|
|
// the borders properly
|
|
|
|
@include hover {
|
2017-10-20 03:01:29 -04:00
|
|
|
z-index: 1;
|
2016-12-22 02:29:16 -05:00
|
|
|
}
|
2013-07-29 17:53:55 -04:00
|
|
|
&:focus,
|
2013-08-05 02:27:15 -04:00
|
|
|
&:active,
|
|
|
|
&.active {
|
2017-10-20 03:01:29 -04:00
|
|
|
z-index: 1;
|
2013-03-01 00:19:02 -05:00
|
|
|
}
|
2012-12-21 03:50:28 -05:00
|
|
|
}
|
2012-01-07 06:45:24 -05:00
|
|
|
|
2016-12-22 02:29:16 -05:00
|
|
|
// Prevent double borders when buttons are next to each other
|
2013-08-13 12:59:38 -04:00
|
|
|
.btn + .btn,
|
|
|
|
.btn + .btn-group,
|
|
|
|
.btn-group + .btn,
|
|
|
|
.btn-group + .btn-group {
|
2017-10-19 03:05:07 -04:00
|
|
|
margin-left: -$btn-border-width;
|
2013-08-13 12:59:38 -04:00
|
|
|
}
|
2013-05-09 19:26:35 -04:00
|
|
|
}
|
|
|
|
|
2012-01-07 06:45:24 -05:00
|
|
|
// Optional: Group multiple button groups together for a toolbar
|
2012-01-05 13:01:42 -05:00
|
|
|
.btn-toolbar {
|
2016-12-22 02:29:16 -05:00
|
|
|
display: flex;
|
2017-01-24 23:43:33 -05:00
|
|
|
flex-wrap: wrap;
|
2016-12-22 02:29:16 -05:00
|
|
|
justify-content: flex-start;
|
2016-12-27 17:36:30 -05:00
|
|
|
|
|
|
|
.input-group {
|
|
|
|
width: auto;
|
|
|
|
}
|
2012-01-05 13:01:42 -05:00
|
|
|
}
|
|
|
|
|
2017-10-22 17:17:28 -04:00
|
|
|
.btn-group {
|
|
|
|
> .btn:first-child {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
2017-12-26 19:04:11 -05:00
|
|
|
// Reset rounded corners
|
|
|
|
> .btn:not(:last-child):not(.dropdown-toggle),
|
|
|
|
> .btn-group:not(:last-child) > .btn {
|
|
|
|
@include border-right-radius(0);
|
2017-10-22 17:17:28 -04:00
|
|
|
}
|
2013-05-03 19:16:26 -04:00
|
|
|
|
2017-12-26 19:04:11 -05:00
|
|
|
> .btn:not(:first-child),
|
|
|
|
> .btn-group:not(:first-child) > .btn {
|
2017-10-22 17:17:28 -04:00
|
|
|
@include border-left-radius(0);
|
|
|
|
}
|
|
|
|
}
|
2012-01-28 14:21:39 -05:00
|
|
|
|
2013-08-12 17:03:57 -04:00
|
|
|
// Sizing
|
|
|
|
//
|
|
|
|
// Remix the default button sizing classes into new ones for easier manipulation.
|
|
|
|
|
2014-12-02 17:02:35 -05:00
|
|
|
.btn-group-sm > .btn { @extend .btn-sm; }
|
|
|
|
.btn-group-lg > .btn { @extend .btn-lg; }
|
2013-08-12 17:03:57 -04:00
|
|
|
|
2012-01-07 06:45:24 -05:00
|
|
|
|
2015-04-18 14:15:40 -04:00
|
|
|
//
|
2012-01-07 06:45:24 -05:00
|
|
|
// Split button dropdowns
|
2015-04-18 14:15:40 -04:00
|
|
|
//
|
2012-01-07 06:45:24 -05:00
|
|
|
|
2017-10-27 23:35:33 -04:00
|
|
|
.dropdown-toggle-split {
|
2017-10-19 03:05:07 -04:00
|
|
|
padding-right: $btn-padding-x * .75;
|
|
|
|
padding-left: $btn-padding-x * .75;
|
2016-01-08 16:23:24 -05:00
|
|
|
|
2018-03-12 12:51:00 -04:00
|
|
|
&::after,
|
|
|
|
.dropup &::after,
|
|
|
|
.dropright &::after {
|
2016-05-11 14:36:09 -04:00
|
|
|
margin-left: 0;
|
2016-01-08 16:23:24 -05:00
|
|
|
}
|
2018-03-12 12:51:00 -04:00
|
|
|
|
|
|
|
.dropleft &::before {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
2012-03-10 16:40:58 -05:00
|
|
|
}
|
2012-01-07 06:45:24 -05:00
|
|
|
|
2016-05-11 14:36:09 -04:00
|
|
|
.btn-sm + .dropdown-toggle-split {
|
2017-10-19 03:05:07 -04:00
|
|
|
padding-right: $btn-padding-x-sm * .75;
|
|
|
|
padding-left: $btn-padding-x-sm * .75;
|
2016-05-11 14:36:09 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.btn-lg + .dropdown-toggle-split {
|
2017-10-19 03:05:07 -04:00
|
|
|
padding-right: $btn-padding-x-lg * .75;
|
|
|
|
padding-left: $btn-padding-x-lg * .75;
|
2016-05-11 14:36:09 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-01-13 07:05:34 -05:00
|
|
|
// The clickable button for toggling the menu
|
2017-04-08 19:30:18 -04:00
|
|
|
// Set the same inset shadow as the :active state
|
|
|
|
.btn-group.show .dropdown-toggle {
|
2016-01-09 18:14:36 -05:00
|
|
|
@include box-shadow($btn-active-box-shadow);
|
2013-10-20 20:59:15 -04:00
|
|
|
|
|
|
|
// Show no shadow for `.btn-link` since it has no other button styles.
|
|
|
|
&.btn-link {
|
2014-12-02 17:02:35 -05:00
|
|
|
@include box-shadow(none);
|
2013-10-20 20:59:15 -04:00
|
|
|
}
|
2013-01-13 07:05:34 -05:00
|
|
|
}
|
2012-01-07 06:45:24 -05:00
|
|
|
|
2012-03-23 02:09:31 -04:00
|
|
|
|
2015-04-18 14:15:40 -04:00
|
|
|
//
|
2012-06-19 17:42:46 -04:00
|
|
|
// Vertical button groups
|
2015-04-18 14:15:40 -04:00
|
|
|
//
|
2012-06-19 17:42:46 -04:00
|
|
|
|
2013-08-13 12:59:38 -04:00
|
|
|
.btn-group-vertical {
|
2016-12-22 02:29:16 -05:00
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-start;
|
2016-12-26 20:18:19 -05:00
|
|
|
justify-content: center;
|
2016-12-22 02:29:16 -05:00
|
|
|
|
|
|
|
.btn,
|
|
|
|
.btn-group {
|
2016-12-27 17:36:55 -05:00
|
|
|
width: 100%;
|
2013-08-13 13:24:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
> .btn + .btn,
|
|
|
|
> .btn + .btn-group,
|
|
|
|
> .btn-group + .btn,
|
|
|
|
> .btn-group + .btn-group {
|
2017-10-19 03:05:07 -04:00
|
|
|
margin-top: -$btn-border-width;
|
2013-08-13 12:59:38 -04:00
|
|
|
margin-left: 0;
|
2013-05-09 19:26:35 -04:00
|
|
|
}
|
2013-08-13 12:59:38 -04:00
|
|
|
|
2017-12-26 19:04:11 -05:00
|
|
|
// Reset rounded corners
|
|
|
|
> .btn:not(:last-child):not(.dropdown-toggle),
|
|
|
|
> .btn-group:not(:last-child) > .btn {
|
|
|
|
@include border-bottom-radius(0);
|
2017-08-13 17:55:28 -04:00
|
|
|
}
|
|
|
|
|
2017-12-26 19:04:11 -05:00
|
|
|
> .btn:not(:first-child),
|
|
|
|
> .btn-group:not(:first-child) > .btn {
|
2017-08-13 17:55:28 -04:00
|
|
|
@include border-top-radius(0);
|
2013-08-13 12:59:38 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-05 03:30:03 -05:00
|
|
|
|
2013-03-16 15:34:07 -04:00
|
|
|
// Checkbox and radio options
|
2014-03-07 02:50:55 -05:00
|
|
|
//
|
|
|
|
// In order to support the browser's form validation feedback, powered by the
|
2014-09-07 16:45:54 -04:00
|
|
|
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
|
|
|
|
// `display: none;` or `visibility: hidden;` as that also hides the popover.
|
|
|
|
// Simply visually hiding the inputs via `opacity` would leave them clickable in
|
|
|
|
// certain cases which is prevented by using `clip` and `pointer-events`.
|
2014-03-07 02:50:55 -05:00
|
|
|
// This way, we ensure a DOM element is visible to position the popover from.
|
|
|
|
//
|
2014-09-07 16:45:54 -04:00
|
|
|
// See https://github.com/twbs/bootstrap/pull/12794 and
|
|
|
|
// https://github.com/twbs/bootstrap/pull/14559 for more information.
|
2014-03-07 02:50:55 -05:00
|
|
|
|
2017-11-24 19:58:23 -05:00
|
|
|
.btn-group-toggle {
|
2014-07-06 19:48:41 -04:00
|
|
|
> .btn,
|
|
|
|
> .btn-group > .btn {
|
2017-10-22 15:17:22 -04:00
|
|
|
margin-bottom: 0; // Override default `<label>` value
|
|
|
|
|
2014-07-06 19:48:41 -04:00
|
|
|
input[type="radio"],
|
|
|
|
input[type="checkbox"] {
|
|
|
|
position: absolute;
|
2017-10-22 17:00:00 -04:00
|
|
|
clip: rect(0, 0, 0, 0);
|
2014-09-07 16:45:54 -04:00
|
|
|
pointer-events: none;
|
2014-07-06 19:48:41 -04:00
|
|
|
}
|
|
|
|
}
|
2013-03-16 15:34:07 -04:00
|
|
|
}
|