2013-02-05 14:16:51 -05:00
|
|
|
// --------------------------------------------------
|
|
|
|
// Buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Base
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2019-12-13 14:09:48 -05:00
|
|
|
@mixin btn(
|
2020-08-03 22:57:10 -04:00
|
|
|
$text-color: var(--primary),
|
|
|
|
$bg-color: var(--primary-low),
|
|
|
|
$icon-color: var(--primary-high),
|
|
|
|
$hover-text-color: var(--secondary),
|
|
|
|
$hover-bg-color: var(--primary-medium),
|
|
|
|
$hover-icon-color: var(--primary-low)
|
2019-12-13 14:09:48 -05:00
|
|
|
) {
|
2013-02-05 14:16:51 -05:00
|
|
|
display: inline-block;
|
|
|
|
margin: 0;
|
|
|
|
padding: 6px 12px;
|
2019-12-13 14:09:48 -05:00
|
|
|
min-height: 30px;
|
|
|
|
border: none;
|
|
|
|
box-sizing: border-box;
|
|
|
|
font-weight: normal;
|
|
|
|
color: $text-color;
|
|
|
|
background: $bg-color;
|
2018-01-12 17:27:38 -05:00
|
|
|
font-size: $font-0;
|
2018-09-19 08:37:04 -04:00
|
|
|
line-height: $line-height-small;
|
2013-02-05 14:16:51 -05:00
|
|
|
text-align: center;
|
|
|
|
cursor: pointer;
|
2018-06-08 05:49:31 -04:00
|
|
|
transition: all 0.25s;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
2019-12-13 14:09:48 -05:00
|
|
|
color: $icon-color;
|
|
|
|
margin-right: 0.45em;
|
2019-01-31 13:59:49 -05:00
|
|
|
transition: color 0.25s;
|
2019-12-13 14:09:48 -05:00
|
|
|
line-height: $line-height-medium; // Match button text line-height
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2013-05-07 14:25:41 -04:00
|
|
|
&.no-text {
|
2019-07-22 10:31:21 -04:00
|
|
|
.d-icon {
|
2013-05-07 14:25:41 -04:00
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
2019-10-28 16:04:29 -04:00
|
|
|
@include hover {
|
2019-12-13 14:09:48 -05:00
|
|
|
background: $hover-bg-color;
|
|
|
|
color: $hover-text-color;
|
2019-10-28 16:04:29 -04:00
|
|
|
.d-icon {
|
2019-12-13 14:09:48 -05:00
|
|
|
color: $hover-icon-color;
|
2018-10-04 17:15:37 -04:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2019-12-13 14:09:48 -05:00
|
|
|
&[href] {
|
|
|
|
color: $text-color;
|
|
|
|
}
|
|
|
|
&:active,
|
|
|
|
&.btn-active {
|
2020-07-28 18:21:53 -04:00
|
|
|
@include linear-gradient($hover-bg-color 0%, $bg-color 100%);
|
2019-12-13 14:09:48 -05:00
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&[disabled],
|
|
|
|
&.disabled {
|
2019-12-13 14:09:48 -05:00
|
|
|
opacity: 0.4;
|
2018-06-08 05:49:31 -04:00
|
|
|
&:hover {
|
2019-12-13 14:09:48 -05:00
|
|
|
color: $text-color;
|
|
|
|
background: $bg-color;
|
2019-01-31 13:59:49 -05:00
|
|
|
.d-icon {
|
2019-12-13 14:09:48 -05:00
|
|
|
color: $icon-color;
|
2019-01-31 13:59:49 -05:00
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
}
|
2014-02-12 23:06:49 -05:00
|
|
|
cursor: not-allowed;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2020-03-30 17:17:00 -04:00
|
|
|
|
|
|
|
.loading-container {
|
|
|
|
display: none;
|
|
|
|
margin: 0 6.75px 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-loading {
|
|
|
|
&.btn-text {
|
|
|
|
.d-button-label {
|
|
|
|
font-size: $font-down-2;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.btn-small {
|
|
|
|
.loading-icon {
|
|
|
|
font-size: $font-down-1;
|
|
|
|
margin-right: 0.2em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.loading-icon {
|
|
|
|
-webkit-animation: rotate-forever 1s infinite linear, fadein 1s;
|
|
|
|
animation: rotate-forever 1s infinite linear, fadein 1s;
|
|
|
|
}
|
|
|
|
}
|
2019-12-13 14:09:48 -05:00
|
|
|
}
|
2017-05-11 14:47:08 -04:00
|
|
|
|
2019-12-13 14:09:48 -05:00
|
|
|
.btn.hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Default button
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
@include btn;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Primary button
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn-primary {
|
2019-12-13 14:09:48 -05:00
|
|
|
@include btn(
|
2020-08-03 22:57:10 -04:00
|
|
|
$text-color: var(--secondary),
|
|
|
|
$bg-color: var(--tertiary),
|
|
|
|
$icon-color: var(--secondary),
|
|
|
|
$hover-bg-color: var(--tertiary-hover),
|
|
|
|
$hover-icon-color: var(--secondary)
|
2019-12-13 14:09:48 -05:00
|
|
|
);
|
2013-02-14 02:56:13 -05:00
|
|
|
}
|
2013-02-14 02:47:19 -05:00
|
|
|
|
2013-02-14 02:56:13 -05:00
|
|
|
// Danger button
|
|
|
|
// --------------------------------------------------
|
2013-02-14 02:47:19 -05:00
|
|
|
|
2013-02-14 02:56:13 -05:00
|
|
|
.btn-danger {
|
2019-12-13 14:09:48 -05:00
|
|
|
@include btn(
|
2020-08-03 22:57:10 -04:00
|
|
|
$text-color: var(--secondary),
|
|
|
|
$bg-color: var(--danger),
|
|
|
|
$icon-color: var(--danger-low),
|
|
|
|
$hover-bg-color: var(--danger-hover),
|
|
|
|
$hover-icon-color: var(--danger-low)
|
2019-12-13 14:09:48 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ✘ and ✔ buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn.cancel {
|
|
|
|
@include btn(
|
2020-08-03 22:57:10 -04:00
|
|
|
$text-color: var(--secondary),
|
|
|
|
$bg-color: var(--danger),
|
|
|
|
$icon-color: var(--secondary),
|
|
|
|
$hover-bg-color: var(--danger-hover),
|
|
|
|
$hover-icon-color: var(--secondary)
|
2019-12-13 14:09:48 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn.ok {
|
|
|
|
@include btn(
|
2020-08-03 22:57:10 -04:00
|
|
|
$text-color: var(--secondary),
|
|
|
|
$bg-color: var(--success),
|
|
|
|
$icon-color: var(--secondary),
|
|
|
|
$hover-bg-color: var(--success-hover),
|
|
|
|
$hover-icon-color: var(--secondary)
|
2019-12-13 14:09:48 -05:00
|
|
|
);
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Social buttons
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.btn-social {
|
2019-02-01 06:01:59 -05:00
|
|
|
.d-icon {
|
|
|
|
color: #fff;
|
|
|
|
}
|
2018-01-22 21:19:38 -05:00
|
|
|
color: #fff;
|
2018-11-22 10:00:32 -05:00
|
|
|
background: #666;
|
2018-01-22 21:19:38 -05:00
|
|
|
&:hover {
|
|
|
|
color: #fff;
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
&[href] {
|
2020-08-03 22:57:10 -04:00
|
|
|
color: var(--secondary);
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
&:before {
|
2015-07-21 01:46:33 -04:00
|
|
|
margin-right: 9px;
|
2018-02-20 07:29:43 -05:00
|
|
|
font-size: $font-0;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2018-06-08 05:49:31 -04:00
|
|
|
&.google_oauth2 {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--google);
|
2018-10-24 22:11:19 -04:00
|
|
|
color: #333;
|
2020-08-03 22:57:10 -04:00
|
|
|
border: 1px solid var(--primary-low);
|
2018-11-26 16:49:57 -05:00
|
|
|
// non-FA SVG icon for Google in login-buttons.hbs
|
|
|
|
.d-icon {
|
|
|
|
opacity: 0.9;
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
|
|
|
color: currentColor;
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--google-hover);
|
2019-03-15 17:20:52 -04:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2016-02-24 20:21:59 -05:00
|
|
|
&.instagram {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--instagram);
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--instagram-hover);
|
2019-03-15 17:20:52 -04:00
|
|
|
}
|
2016-02-24 20:21:59 -05:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
&.facebook {
|
|
|
|
background: $facebook;
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--facebook-hover);
|
2019-03-15 17:20:52 -04:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2013-05-23 16:40:50 -04:00
|
|
|
&.cas {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--cas);
|
2013-05-23 16:40:50 -04:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
&.twitter {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--twitter);
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--twitter-hover);
|
2019-03-15 17:20:52 -04:00
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
2013-02-25 23:28:32 -05:00
|
|
|
&.github {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--github);
|
2019-03-15 17:20:52 -04:00
|
|
|
&:hover {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--github-hover);
|
2019-03-15 17:20:52 -04:00
|
|
|
}
|
2013-02-25 23:28:32 -05:00
|
|
|
}
|
2019-08-30 05:54:19 -04:00
|
|
|
&.discord {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--discord);
|
2019-08-30 05:54:19 -04:00
|
|
|
&:hover {
|
2020-08-03 22:57:10 -04:00
|
|
|
background: var(--discord-hover);
|
2019-08-30 05:54:19 -04:00
|
|
|
}
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Button Sizes
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Small
|
|
|
|
|
|
|
|
.btn-small {
|
2020-02-19 12:38:46 -05:00
|
|
|
padding: 6px;
|
2018-01-12 17:27:38 -05:00
|
|
|
font-size: $font-down-1;
|
2020-02-19 12:38:46 -05:00
|
|
|
min-height: 20px;
|
2020-02-24 13:18:46 -05:00
|
|
|
.d-icon {
|
|
|
|
max-height: 0.87em;
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Large
|
|
|
|
|
|
|
|
.btn-large {
|
|
|
|
padding: 9px 18px;
|
2018-01-12 17:27:38 -05:00
|
|
|
font-size: $font-up-1;
|
|
|
|
line-height: $line-height-small;
|
2013-02-14 02:56:13 -05:00
|
|
|
}
|
2017-07-24 17:31:14 -04:00
|
|
|
|
|
|
|
.btn-flat {
|
|
|
|
background: transparent;
|
|
|
|
border: 0;
|
|
|
|
outline: 0;
|
2018-01-12 17:27:38 -05:00
|
|
|
line-height: $line-height-small;
|
2019-01-31 14:06:32 -05:00
|
|
|
transition: color 0.25s, background 0.25s;
|
2017-07-27 15:03:41 -04:00
|
|
|
.d-icon {
|
2020-08-03 22:57:10 -04:00
|
|
|
color: var(--primary-low-mid);
|
2019-01-31 13:59:49 -05:00
|
|
|
}
|
2019-10-28 16:04:29 -04:00
|
|
|
@include hover {
|
|
|
|
.d-icon {
|
2020-08-03 22:57:10 -04:00
|
|
|
color: var(--primary);
|
2019-10-28 16:04:29 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
&.close {
|
|
|
|
padding: 0;
|
|
|
|
min-height: unset;
|
|
|
|
background: transparent;
|
|
|
|
font-size: $font-up-3;
|
|
|
|
.d-icon {
|
2020-08-03 22:57:10 -04:00
|
|
|
color: var(--primary-high);
|
2019-10-28 16:04:29 -04:00
|
|
|
}
|
|
|
|
@include hover {
|
|
|
|
background: transparent;
|
2019-01-31 15:13:22 -05:00
|
|
|
.d-icon {
|
2020-08-03 22:57:10 -04:00
|
|
|
color: var(--primary);
|
2019-01-31 15:13:22 -05:00
|
|
|
}
|
2019-01-31 13:59:49 -05:00
|
|
|
}
|
2017-07-25 11:37:32 -04:00
|
|
|
}
|
2017-07-24 17:31:14 -04:00
|
|
|
}
|
2019-10-31 15:36:24 -04:00
|
|
|
|
|
|
|
.btn-link {
|
|
|
|
background: transparent;
|
|
|
|
border: 0;
|
|
|
|
outline: 0;
|
|
|
|
padding: 0;
|
2020-08-03 22:57:10 -04:00
|
|
|
color: var(--tertiary);
|
2019-10-31 15:36:24 -04:00
|
|
|
&:focus {
|
|
|
|
outline: 1px currentColor dotted;
|
|
|
|
}
|
|
|
|
}
|