2015-07-17 13:17:49 +08:00
|
|
|
//
|
|
|
|
// Button groups
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Make the div behave like a button
|
|
|
|
.ButtonGroup {
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
|
|
> .Button {
|
|
|
|
position: relative;
|
|
|
|
float: left;
|
|
|
|
// Bring the "active" button to the front
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active,
|
|
|
|
&.active {
|
|
|
|
z-index: 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not(:first-child):not(:last-child):not(.Dropdown-toggle) {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
&:first-child:not(:last-child):not(.Dropdown-toggle) {
|
|
|
|
margin-left: 0;
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
}
|
|
|
|
&:last-child:not(:first-child), &.Dropdown-toggle:not(:first-child) {
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.Button + .Button {
|
|
|
|
margin-left: 1px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.Button {
|
|
|
|
display: inline-block;
|
|
|
|
margin-bottom: 0; // For input.btn
|
|
|
|
text-align: center;
|
|
|
|
vertical-align: middle;
|
|
|
|
cursor: pointer;
|
|
|
|
white-space: nowrap;
|
|
|
|
line-height: 20px;
|
|
|
|
padding: 8px 13px;
|
|
|
|
border-radius: @border-radius;
|
|
|
|
.user-select(none);
|
|
|
|
.Button--color(@control-color, @control-bg);
|
|
|
|
border: 0;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&.active,
|
|
|
|
.open > &.Dropdown-toggle {
|
|
|
|
.box-shadow(inset 0 3px 5px rgba(0, 0, 0, .125));
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus,
|
|
|
|
&.focus {
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.disabled,
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
cursor: default;
|
|
|
|
opacity: 0.65;
|
|
|
|
.box-shadow(none);
|
|
|
|
}
|
|
|
|
|
|
|
|
a& {
|
|
|
|
&.disabled,
|
|
|
|
fieldset[disabled] & {
|
|
|
|
pointer-events: none; // Future-proof disabling of clicks on `<a>` elements
|
|
|
|
}
|
|
|
|
}
|
2015-07-29 19:30:09 +08:00
|
|
|
|
|
|
|
.Button-label {
|
|
|
|
.transition(margin-right 0.1s);
|
|
|
|
}
|
|
|
|
.LoadingIndicator {
|
|
|
|
color: inherit;
|
2016-06-04 16:35:46 +08:00
|
|
|
margin: 0 -5px 0 -15px;
|
2015-07-29 19:30:09 +08:00
|
|
|
}
|
|
|
|
&.loading {
|
|
|
|
.Button-label {
|
|
|
|
margin-right: 20px;
|
|
|
|
}
|
|
|
|
}
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.Button--color(@color; @background) {
|
|
|
|
color: @color;
|
|
|
|
background: @background;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
2015-07-18 11:36:53 +08:00
|
|
|
&.focus {
|
|
|
|
background-color: darken(fadein(@background, 5%), 5%);
|
|
|
|
}
|
|
|
|
|
2015-07-17 13:17:49 +08:00
|
|
|
&:active,
|
|
|
|
&.active,
|
|
|
|
.open > .Dropdown-toggle& {
|
2015-07-18 11:36:53 +08:00
|
|
|
background-color: darken(fadein(@background, 10%), 10%);
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.disabled,
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
background: @background;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.Button--square {
|
|
|
|
padding-left: 9px;
|
|
|
|
padding-right: 9px;
|
|
|
|
}
|
|
|
|
.Button--rounded {
|
|
|
|
border-radius: 18px;
|
|
|
|
}
|
|
|
|
.Button--flat {
|
|
|
|
background: transparent;
|
|
|
|
border-radius: 18px;
|
|
|
|
}
|
|
|
|
.Button--link {
|
|
|
|
background: transparent !important;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background: transparent !important;
|
|
|
|
color: @link-color;
|
|
|
|
}
|
|
|
|
&:active,
|
|
|
|
&.active,
|
|
|
|
&:focus,
|
2015-08-06 10:46:55 +08:00
|
|
|
&.focus,
|
|
|
|
.open > &.Dropdown-toggle {
|
2015-07-17 13:17:49 +08:00
|
|
|
background: transparent !important;
|
|
|
|
.box-shadow(none);
|
|
|
|
color: @link-color;
|
|
|
|
}
|
|
|
|
}
|
2015-07-22 08:30:02 +08:00
|
|
|
.Button--text {
|
|
|
|
background: transparent !important;
|
|
|
|
padding: 0;
|
2015-07-29 19:30:27 +08:00
|
|
|
color: inherit !important;
|
2015-07-31 18:46:47 +08:00
|
|
|
line-height: inherit;
|
2015-07-22 08:30:02 +08:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
&:active,
|
2015-07-31 18:46:47 +08:00
|
|
|
&.active,
|
|
|
|
.open > &.Dropdown-toggle {
|
2015-07-22 08:30:02 +08:00
|
|
|
.box-shadow(none);
|
|
|
|
}
|
|
|
|
}
|
2015-07-17 13:17:49 +08:00
|
|
|
.Button--primary {
|
|
|
|
.Button--color(@body-bg, @primary-color);
|
|
|
|
font-weight: bold;
|
2015-07-29 19:30:09 +08:00
|
|
|
padding-left: 20px;
|
|
|
|
padding-right: 20px;
|
2015-07-17 13:17:49 +08:00
|
|
|
|
|
|
|
.Button-icon {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.Button--danger {
|
|
|
|
.Button--color(@control-danger-color, @control-danger-bg);
|
|
|
|
}
|
|
|
|
.Button--more {
|
|
|
|
padding: 2px 4px;
|
|
|
|
line-height: 1;
|
2015-08-04 09:19:41 +08:00
|
|
|
|
|
|
|
.Button-icon {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|
|
|
|
.Button--block {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
2016-02-07 09:40:02 +08:00
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2015-07-17 13:17:49 +08:00
|
|
|
|
|
|
|
// Vertically space out multiple block buttons
|
|
|
|
+ .Button--block {
|
|
|
|
margin-top: 5px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Little round icon buttons
|
|
|
|
.Button--icon {
|
|
|
|
width: 36px;
|
|
|
|
text-align: center;
|
|
|
|
padding: 8px 0;
|
|
|
|
|
|
|
|
.Button-label, .Button-caret {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.Button-icon {
|
|
|
|
font-size: 16px;
|
|
|
|
vertical-align: -1px;
|
2015-07-31 18:46:47 +08:00
|
|
|
margin: 0;
|
2015-07-17 13:17:49 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.SessionDropdown .Dropdown-toggle {
|
|
|
|
border-radius: 18px;
|
|
|
|
|
|
|
|
.Avatar {
|
2016-01-19 16:49:16 +08:00
|
|
|
margin: -2px 5px -2px -6px;
|
2015-07-17 13:17:49 +08:00
|
|
|
.Avatar--size(24px);
|
|
|
|
}
|
|
|
|
}
|
2015-07-31 18:46:47 +08:00
|
|
|
.Button-icon {
|
|
|
|
margin-right: 3px;
|
|
|
|
}
|
2015-07-17 13:17:49 +08:00
|
|
|
.Button-icon,
|
|
|
|
.Button-caret {
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
2015-08-05 08:20:57 +08:00
|
|
|
.Button-caret {
|
|
|
|
margin-left: 3px;
|
|
|
|
}
|
2015-07-17 13:17:49 +08:00
|
|
|
.Button-badge {
|
|
|
|
font-size: 12px;
|
|
|
|
font-weight: bold;
|
|
|
|
margin-left: 10px;
|
|
|
|
}
|