2014-06-04 11:14:35 -04:00
|
|
|
//
|
|
|
|
// Buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Base styles
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2023-11-27 05:02:32 -05:00
|
|
|
.btn {
|
2022-11-14 10:07:21 -05:00
|
|
|
display: inline-block;
|
|
|
|
margin-bottom: 0; // For input.btn
|
|
|
|
font-weight: @btn-font-weight;
|
|
|
|
text-align: center;
|
|
|
|
vertical-align: middle;
|
|
|
|
cursor: pointer;
|
2022-12-05 10:31:53 -05:00
|
|
|
border: 0 solid transparent;
|
2022-11-14 10:07:21 -05:00
|
|
|
white-space: nowrap;
|
|
|
|
.button-size(
|
|
|
|
@padding-base-vertical; @padding-base-horizontal; @font-size-base;
|
|
|
|
@line-height-base; @btn-border-radius-base
|
|
|
|
);
|
|
|
|
.user-select(none);
|
|
|
|
|
|
|
|
&,
|
|
|
|
&:active,
|
|
|
|
&.active {
|
|
|
|
&:focus {
|
|
|
|
.tab-focus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @btn-default-color;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// &:active,
|
|
|
|
// &.active {
|
|
|
|
// }
|
|
|
|
|
|
|
|
&.disabled,
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active,
|
|
|
|
&.active {
|
|
|
|
cursor: not-allowed;
|
|
|
|
opacity: 1; //needed to override deprecated styling in individual classes
|
|
|
|
.box-shadow(none);
|
|
|
|
}
|
|
|
|
}
|
2022-11-17 12:53:55 -05:00
|
|
|
|
|
|
|
&.disabled.btn-info,
|
|
|
|
&.disabled.btn-default,
|
|
|
|
&[disabled].btn-info,
|
|
|
|
&[disabled].btn-default,
|
|
|
|
fieldset[disabled].btn-info,
|
|
|
|
fieldset[disabled].btn-default & {
|
|
|
|
// style only for deprecated classes
|
|
|
|
.opacity(0.65);
|
|
|
|
}
|
2022-11-14 10:07:21 -05:00
|
|
|
}
|
2014-06-04 11:14:35 -04:00
|
|
|
|
|
|
|
// Alternate buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn-default {
|
|
|
|
.button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
|
|
|
|
}
|
2018-11-08 10:54:55 -05:00
|
|
|
.btn-default-outline {
|
|
|
|
.button-outline-variant(@btn-default-bg);
|
|
|
|
}
|
2023-11-27 05:02:32 -05:00
|
|
|
.btn-primary {
|
2022-11-14 10:07:21 -05:00
|
|
|
.btn-borderless();
|
|
|
|
}
|
2020-06-01 09:54:00 -04:00
|
|
|
.btn-primary-on-primary-bg {
|
|
|
|
.button-variant(@white; @ol-dark-green; @ol-dark-green);
|
|
|
|
}
|
2014-06-04 11:14:35 -04:00
|
|
|
// Success appears as green
|
|
|
|
.btn-success {
|
2022-11-14 10:07:21 -05:00
|
|
|
.btn-primary;
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
2022-11-14 10:07:21 -05:00
|
|
|
|
2014-06-04 11:14:35 -04:00
|
|
|
// Info appears as blue-green
|
|
|
|
.btn-info {
|
|
|
|
.button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
|
|
|
|
}
|
|
|
|
// Warning appears as orange
|
|
|
|
.btn-warning {
|
|
|
|
.button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
|
|
|
|
}
|
|
|
|
// Danger and error appear as red
|
2023-11-27 05:02:32 -05:00
|
|
|
.btn-danger {
|
2022-11-17 12:53:55 -05:00
|
|
|
.btn-borderless(@white, @red, @red-60);
|
|
|
|
}
|
2023-04-17 09:48:09 -04:00
|
|
|
// Danger Ghost and error appear as light red with no border
|
2023-11-27 05:02:32 -05:00
|
|
|
.btn-danger-ghost {
|
|
|
|
.btn-borderless(@red-50, @btn-danger-ghost-bg, @red-10);
|
2023-09-18 07:35:43 -04:00
|
|
|
}
|
|
|
|
// Info Ghost appear as info blue with no border
|
2023-11-27 05:02:32 -05:00
|
|
|
.btn-info-ghost {
|
|
|
|
.btn-borderless(@blue-50, @btn-info-ghost-bg, @blue-10);
|
2023-09-18 07:35:43 -04:00
|
|
|
}
|
2024-01-03 10:13:32 -05:00
|
|
|
// Background Ghost appear as neutral-90 (matching our text colour) with no border
|
|
|
|
.btn-bg-ghost {
|
|
|
|
.btn-borderless(@neutral-90, @btn-info-ghost-bg, @neutral-10);
|
|
|
|
}
|
2023-09-18 07:35:43 -04:00
|
|
|
// Inline button to fit text, without link styling.
|
|
|
|
// TODO: generic class for other styles
|
2023-11-27 05:02:32 -05:00
|
|
|
.btn-info-ghost-inline {
|
2023-09-18 07:35:43 -04:00
|
|
|
.btn-borderless(@blue-50, @btn-info-ghost-bg, @blue-10);
|
|
|
|
padding: 0 !important;
|
|
|
|
font-size: inherit !important;
|
|
|
|
vertical-align: inherit;
|
|
|
|
}
|
2022-11-14 10:07:21 -05:00
|
|
|
// btn-secondary
|
2023-11-27 05:02:32 -05:00
|
|
|
.btn-secondary {
|
2022-11-14 10:07:21 -05:00
|
|
|
.btn-bordered();
|
|
|
|
}
|
2023-11-27 05:02:32 -05:00
|
|
|
.btn-secondary-info {
|
2022-11-14 10:07:21 -05:00
|
|
|
.btn-secondary;
|
|
|
|
}
|
2014-06-04 11:14:35 -04:00
|
|
|
|
2023-05-02 10:00:45 -04:00
|
|
|
// Buttons relating to premium features have a special background
|
|
|
|
.btn-premium {
|
|
|
|
.premium-background;
|
|
|
|
color: @white;
|
|
|
|
}
|
|
|
|
|
2020-06-01 09:54:00 -04:00
|
|
|
.reset-btns {
|
|
|
|
// reset all buttons back to their original colors
|
|
|
|
.btn-danger {
|
|
|
|
.btn-danger;
|
|
|
|
}
|
|
|
|
.btn-default {
|
|
|
|
.btn-default;
|
|
|
|
}
|
|
|
|
.btn-default-outline {
|
|
|
|
.btn-default-outline;
|
|
|
|
}
|
|
|
|
.btn-info {
|
|
|
|
.btn-info;
|
|
|
|
}
|
|
|
|
.btn-primary {
|
|
|
|
.btn-primary;
|
|
|
|
}
|
|
|
|
.btn-success {
|
|
|
|
.btn-success;
|
|
|
|
}
|
|
|
|
.btn-warning {
|
|
|
|
.btn-warning;
|
|
|
|
}
|
2022-11-14 10:07:21 -05:00
|
|
|
.btn-secondary {
|
|
|
|
.btn-secondary;
|
|
|
|
}
|
2020-06-01 09:54:00 -04:00
|
|
|
}
|
|
|
|
|
2014-06-04 11:14:35 -04:00
|
|
|
// Link buttons
|
|
|
|
// -------------------------
|
|
|
|
|
|
|
|
// Make a button look and behave like a link
|
|
|
|
.btn-link {
|
|
|
|
color: @link-color;
|
|
|
|
font-weight: normal;
|
|
|
|
cursor: pointer;
|
|
|
|
border-radius: 0;
|
|
|
|
|
|
|
|
&,
|
|
|
|
&:active,
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
background-color: transparent;
|
|
|
|
.box-shadow(none);
|
|
|
|
}
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active {
|
|
|
|
border-color: transparent;
|
|
|
|
}
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @link-hover-color;
|
|
|
|
text-decoration: underline;
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
&[disabled],
|
|
|
|
fieldset[disabled] & {
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @btn-link-disabled-color;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
}
|
2022-04-25 07:05:15 -04:00
|
|
|
|
|
|
|
&.btn-danger {
|
|
|
|
color: @ol-red;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @ol-dark-red;
|
|
|
|
}
|
|
|
|
}
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
|
|
|
|
2019-01-18 05:09:57 -05:00
|
|
|
.btn-inline-link {
|
|
|
|
.btn-link();
|
|
|
|
padding: 0;
|
|
|
|
font-size: inherit;
|
|
|
|
vertical-align: inherit;
|
|
|
|
}
|
|
|
|
|
2014-06-04 11:14:35 -04:00
|
|
|
// Button Sizes
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2018-09-17 19:08:11 -04:00
|
|
|
.btn-xl {
|
2019-12-05 14:09:31 -05:00
|
|
|
.button-size(
|
|
|
|
@padding-large-vertical; @padding-large-horizontal; @font-size-h2;
|
|
|
|
@line-height-large; @btn-border-radius-large
|
|
|
|
);
|
2018-09-17 19:08:11 -04:00
|
|
|
}
|
|
|
|
|
2014-06-04 11:14:35 -04:00
|
|
|
.btn-lg {
|
|
|
|
// line-height: ensure even-numbered height of button next to large input
|
2019-12-05 14:09:31 -05:00
|
|
|
.button-size(
|
|
|
|
@padding-large-vertical; @padding-large-horizontal; @font-size-large;
|
|
|
|
@line-height-large; @btn-border-radius-large
|
|
|
|
);
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
|
|
|
.btn-sm {
|
|
|
|
// line-height: ensure proper height of button next to small input
|
2019-12-05 14:09:31 -05:00
|
|
|
.button-size(
|
|
|
|
@padding-small-vertical; @padding-small-horizontal; @font-size-small;
|
|
|
|
@line-height-small; @btn-border-radius-small
|
|
|
|
);
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
|
|
|
.btn-xs {
|
2019-12-05 14:09:31 -05:00
|
|
|
.button-size(
|
|
|
|
@padding-xs-vertical; @padding-xs-horizontal; @font-size-small;
|
|
|
|
@line-height-small; @btn-border-radius-small
|
|
|
|
);
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Block button
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn-block {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
padding-left: 0;
|
|
|
|
padding-right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Vertically space out multiple block buttons
|
|
|
|
.btn-block + .btn-block {
|
|
|
|
margin-top: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Specificity overrides
|
2019-12-05 14:09:31 -05:00
|
|
|
input[type='submit'],
|
|
|
|
input[type='reset'],
|
|
|
|
input[type='button'] {
|
2014-06-04 11:14:35 -04:00
|
|
|
&.btn-block {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
2022-11-30 07:09:58 -05:00
|
|
|
|
2023-11-27 05:02:32 -05:00
|
|
|
.login-btn {
|
2022-11-30 07:09:58 -05:00
|
|
|
.btn;
|
|
|
|
.btn-secondary;
|
|
|
|
position: relative;
|
|
|
|
padding-left: 20px;
|
|
|
|
padding-right: 0;
|
|
|
|
}
|
|
|
|
|
2023-06-29 09:38:54 -04:00
|
|
|
.login-expand-more-btn {
|
|
|
|
display: list-item;
|
|
|
|
}
|