2019-04-08 22:22:22 +08:00
|
|
|
@import "/imports/ui/stylesheets/mixins/_indicators";
|
2020-09-02 02:46:13 +08:00
|
|
|
@import "/imports/ui/stylesheets/variables/placeholders";
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2018-10-19 04:37:14 +08:00
|
|
|
/* Base
|
|
|
|
* ==========
|
|
|
|
*/
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2018-10-19 04:37:14 +08:00
|
|
|
:root {
|
|
|
|
--btn-default-color: var(--color-gray);
|
|
|
|
--btn-default-bg: var(--color-white);
|
|
|
|
--btn-default-border: var(--color-white);
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2018-10-19 04:37:14 +08:00
|
|
|
--btn-primary-color: var(--color-white);
|
|
|
|
--btn-primary-bg: var(--color-primary);
|
|
|
|
--btn-primary-border: var(--color-primary);
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2018-10-19 04:37:14 +08:00
|
|
|
--btn-success-color: var(--color-white);
|
|
|
|
--btn-success-bg: var(--color-success);
|
|
|
|
--btn-success-border: var(--color-success);
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2021-03-26 05:22:50 +08:00
|
|
|
--btn-warning-color: var(--color-white);
|
|
|
|
--btn-warning-bg: var(--color-warning);
|
|
|
|
--btn-warning-border: var(--color-warning);
|
|
|
|
|
2018-10-19 04:37:14 +08:00
|
|
|
--btn-danger-color: var(--color-white);
|
|
|
|
--btn-danger-bg: var(--color-danger);
|
|
|
|
--btn-danger-border: var(--color-danger);
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2019-03-20 01:11:48 +08:00
|
|
|
--btn-dark-color: var(--color-white);
|
|
|
|
--btn-dark-bg: var(--color-gray-dark);
|
|
|
|
--btn-dark-border: var(--color-danger);
|
|
|
|
|
2021-03-26 05:22:50 +08:00
|
|
|
--btn-offline-color: var(--color-white);
|
|
|
|
--btn-offline-bg: var(--color-offline);
|
|
|
|
--btn-offline-border: var(--color-offline);
|
|
|
|
|
2018-10-19 04:37:14 +08:00
|
|
|
--btn-border-size: var(--border-size);
|
|
|
|
--btn-border-radius: var(--border-radius);
|
|
|
|
--btn-font-weight: 600;
|
|
|
|
--btn-spacing: .35rem;
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2018-10-19 04:37:14 +08:00
|
|
|
--btn-sm-font-size: calc(var(--font-size-small) * .85);
|
|
|
|
--btn-sm-padding: var(--sm-padding-y) var(--sm-padding-x);
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2018-10-19 04:37:14 +08:00
|
|
|
--btn-md-font-size: calc(var(--font-size-base) * .85);
|
|
|
|
--btn-md-padding: var(--md-padding-y) var(--md-padding-x);
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2018-10-19 04:37:14 +08:00
|
|
|
--btn-lg-font-size: calc(var(--font-size-large) * .85);
|
|
|
|
--btn-lg-padding: var(--lg-padding-y) var(--lg-padding-x);
|
|
|
|
|
|
|
|
--btn-jumbo-font-size: 3rem;
|
|
|
|
--btn-jumbo-padding: var(--jumbo-padding-y) var(--jumbo-padding-x);
|
|
|
|
}
|
2016-10-12 03:04:50 +08:00
|
|
|
|
2016-05-20 21:37:19 +08:00
|
|
|
.button {
|
2017-11-09 03:42:37 +08:00
|
|
|
border: none;
|
|
|
|
overflow: visible;
|
|
|
|
display: inline-block;
|
2018-10-19 04:37:14 +08:00
|
|
|
border-radius: var(--border-size);
|
|
|
|
font-weight: var(--btn-font-weight);
|
2017-12-16 03:56:12 +08:00
|
|
|
line-height: 1;
|
2016-05-20 21:37:19 +08:00
|
|
|
text-align: center;
|
|
|
|
white-space: nowrap;
|
|
|
|
vertical-align: middle;
|
|
|
|
cursor: pointer;
|
|
|
|
user-select: none;
|
2019-03-05 10:46:37 +08:00
|
|
|
|
2019-03-22 06:16:56 +08:00
|
|
|
&:-moz-focusring {
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
2016-05-20 21:37:19 +08:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2020-09-02 02:46:13 +08:00
|
|
|
@extend %highContrastOutline;
|
2016-05-20 21:37:19 +08:00
|
|
|
text-decoration: none;
|
2019-04-08 22:22:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&:focus {
|
2020-09-02 02:46:13 +08:00
|
|
|
@extend %highContrastOutline;
|
2019-04-08 22:22:22 +08:00
|
|
|
outline-style: solid;
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-image: none;
|
|
|
|
}
|
|
|
|
|
2016-08-03 06:55:20 +08:00
|
|
|
&[aria-disabled="true"] {
|
2016-05-20 21:37:19 +08:00
|
|
|
cursor: not-allowed;
|
|
|
|
opacity: .65;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
2017-09-29 22:54:24 +08:00
|
|
|
|
|
|
|
&,
|
|
|
|
&:active {
|
|
|
|
&:focus {
|
|
|
|
span:first-of-type::before {
|
2018-10-19 04:37:14 +08:00
|
|
|
border-radius: var(--border-size);
|
2017-09-29 22:54:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.buttonWrapper {
|
2017-11-09 03:42:37 +08:00
|
|
|
border: none;
|
|
|
|
overflow: visible !important;
|
|
|
|
display: inline-block;
|
2019-03-22 06:16:56 +08:00
|
|
|
cursor: pointer;
|
|
|
|
|
2021-04-22 00:58:02 +08:00
|
|
|
|
2017-09-29 22:54:24 +08:00
|
|
|
|
2019-04-08 22:22:22 +08:00
|
|
|
&:focus,
|
|
|
|
&:hover {
|
2020-09-02 02:46:13 +08:00
|
|
|
@extend %highContrastOutline;
|
2019-04-08 22:22:22 +08:00
|
|
|
}
|
|
|
|
|
2019-03-29 06:46:50 +08:00
|
|
|
&:focus {
|
2019-04-08 22:22:22 +08:00
|
|
|
outline-style: solid;
|
2019-03-23 06:45:44 +08:00
|
|
|
}
|
|
|
|
|
2021-04-22 00:58:02 +08:00
|
|
|
&:-moz-focusring {
|
|
|
|
outline-color: transparent;
|
|
|
|
outline-offset: var(--border-radius);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-09-29 22:54:24 +08:00
|
|
|
&:active {
|
|
|
|
&:focus {
|
|
|
|
span:first-of-type::before {
|
|
|
|
border-radius: 50%;
|
2020-09-02 02:46:13 +08:00
|
|
|
@extend %highContrastOutline;
|
2019-04-08 22:22:22 +08:00
|
|
|
outline-style: solid;
|
2017-09-29 22:54:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-09-15 23:12:58 +08:00
|
|
|
|
2016-05-20 21:37:19 +08:00
|
|
|
line-height: 1.5;
|
|
|
|
text-align: center;
|
|
|
|
white-space: nowrap;
|
|
|
|
vertical-align: middle;
|
|
|
|
background: none;
|
|
|
|
padding: 0 !important;
|
2016-09-07 03:10:18 +08:00
|
|
|
|
2018-02-02 19:51:21 +08:00
|
|
|
&[aria-disabled="true"] > span {
|
2017-10-05 04:49:11 +08:00
|
|
|
cursor: not-allowed;
|
|
|
|
opacity: .65;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.label {
|
|
|
|
.buttonWrapper & {
|
|
|
|
opacity: .85;
|
|
|
|
display: block;
|
2018-10-19 04:37:14 +08:00
|
|
|
margin-top: var(--btn-spacing);
|
2017-07-08 00:11:22 +08:00
|
|
|
color: #fff;
|
2016-12-06 20:51:45 +08:00
|
|
|
font-weight: normal;
|
2016-05-20 22:49:28 +08:00
|
|
|
line-height: 1.5;
|
|
|
|
text-align: center;
|
|
|
|
white-space: nowrap;
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.buttonWrapper.sm & {
|
|
|
|
display: inline-block;
|
2019-05-14 21:15:54 +08:00
|
|
|
margin: 0 0 0var(--btn-spacing);
|
|
|
|
|
|
|
|
[dir="rtl"] & {
|
|
|
|
margin:0 var(--btn-spacing) 0 0;
|
|
|
|
}
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2016-05-20 22:49:28 +08:00
|
|
|
& + .icon,
|
2018-10-19 04:37:14 +08:00
|
|
|
& + .button {
|
2019-05-14 21:15:54 +08:00
|
|
|
margin: 0 0 0 var(--btn-spacing);
|
|
|
|
|
|
|
|
[dir="rtl"] & {
|
|
|
|
margin: 0 var(--btn-spacing) 0 0;
|
|
|
|
}
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
2017-11-21 18:35:21 +08:00
|
|
|
&:hover {
|
|
|
|
opacity: .5;
|
|
|
|
}
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2016-06-18 00:42:17 +08:00
|
|
|
.hideLabel {
|
|
|
|
font-size: 0;
|
|
|
|
height: 0;
|
|
|
|
width: 0;
|
|
|
|
margin: 0 !important;
|
|
|
|
padding: 0 !important;
|
|
|
|
overflow: hidden;
|
2018-11-30 00:58:39 +08:00
|
|
|
display: none !important;
|
2021-07-06 04:26:07 +08:00
|
|
|
|
2016-06-18 00:42:17 +08:00
|
|
|
}
|
|
|
|
|
2016-05-20 21:37:19 +08:00
|
|
|
.icon {
|
2019-03-20 01:11:48 +08:00
|
|
|
width: 1em;
|
2016-05-20 21:37:19 +08:00
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
.buttonWrapper & {
|
2016-12-06 20:53:32 +08:00
|
|
|
font-size: 125%;
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
& + .label {
|
2019-05-14 21:15:54 +08:00
|
|
|
margin: 0 0 0 var(--btn-spacing);
|
|
|
|
|
|
|
|
[dir="rtl"] & {
|
|
|
|
margin: 0 var(--btn-spacing) 0 0;
|
|
|
|
}
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
2017-11-21 18:35:21 +08:00
|
|
|
.buttonWrapper:hover & {
|
|
|
|
opacity: .75;
|
|
|
|
}
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2021-05-13 03:43:48 +08:00
|
|
|
.emojiButtonSibling {
|
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2021-06-29 03:28:06 +08:00
|
|
|
z-index: 1;
|
2021-05-13 03:43:48 +08:00
|
|
|
}
|
|
|
|
|
2021-05-10 19:58:52 +08:00
|
|
|
.emojiButton {
|
|
|
|
position: absolute;
|
|
|
|
border-radius: 50%;
|
|
|
|
width: 1em;
|
|
|
|
height: 1em;
|
2021-05-13 03:43:48 +08:00
|
|
|
right: -1px;
|
2021-05-10 19:58:52 +08:00
|
|
|
bottom: 0;
|
|
|
|
background-color: var(--btn-default-bg);
|
|
|
|
overflow: hidden;
|
2021-06-29 03:28:06 +08:00
|
|
|
z-index: 2;
|
2021-05-10 19:58:52 +08:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
transform: scale(1.5);
|
|
|
|
transition-duration: 150ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
.emojiButtonIcon {
|
|
|
|
position: absolute;
|
2021-07-06 04:26:07 +08:00
|
|
|
top: 0;
|
|
|
|
height: 60%;
|
2021-05-10 19:58:52 +08:00
|
|
|
left: 0;
|
2021-07-06 04:26:07 +08:00
|
|
|
width: 75%;
|
|
|
|
margin-left: 25%;
|
|
|
|
font-size: 50%;
|
|
|
|
margin-top: 40%;
|
2021-05-10 19:58:52 +08:00
|
|
|
color: var(--btn-default-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-20 21:37:19 +08:00
|
|
|
/* Colors
|
|
|
|
* ==========
|
|
|
|
*/
|
|
|
|
@mixin button-variant($color, $background, $border) {
|
|
|
|
color: $color;
|
|
|
|
background-color: $background;
|
2018-10-25 03:32:09 +08:00
|
|
|
border: var(--border-size-large) solid transparent;
|
2016-05-20 21:37:19 +08:00
|
|
|
|
2016-09-07 03:10:18 +08:00
|
|
|
&:focus,
|
2018-02-02 19:51:21 +08:00
|
|
|
.buttonWrapper:focus:not([aria-disabled="true"]) & {
|
2016-05-20 21:37:19 +08:00
|
|
|
color: $color;
|
2017-11-09 03:42:37 +08:00
|
|
|
background-color: $background;
|
|
|
|
background-clip: padding-box;
|
2018-10-25 03:32:09 +08:00
|
|
|
box-shadow: 0 0 0 var(--border-size) $border;
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2017-11-09 03:42:37 +08:00
|
|
|
&:hover,
|
|
|
|
.buttonWrapper:hover & {
|
2016-05-20 21:37:19 +08:00
|
|
|
color: $color;
|
2018-10-19 04:37:14 +08:00
|
|
|
// background-color: $active-background; TODO;
|
|
|
|
// border-color: $active-border; TODO;
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-21 00:17:39 +08:00
|
|
|
@mixin button-ghost-variant($color, $variant) {
|
2016-05-20 21:37:19 +08:00
|
|
|
color: $color;
|
|
|
|
background-image: none;
|
|
|
|
background-color: transparent;
|
2018-10-25 03:32:09 +08:00
|
|
|
border: var(--border-size-large) solid transparent;
|
2016-05-20 21:37:19 +08:00
|
|
|
|
|
|
|
&:focus,
|
2016-09-07 03:10:18 +08:00
|
|
|
.buttonWrapper:focus & {
|
2017-11-09 03:42:37 +08:00
|
|
|
color: $color;
|
|
|
|
background-color: $variant;
|
|
|
|
background-clip: padding-box;
|
2018-10-25 03:32:09 +08:00
|
|
|
box-shadow: 0 0 0 var(--border-size-large) $color;
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2017-11-09 03:42:37 +08:00
|
|
|
&:hover,
|
|
|
|
.buttonWrapper:hover & {
|
|
|
|
color: $color;
|
|
|
|
background-color: $variant;
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.default {
|
2018-10-19 04:37:14 +08:00
|
|
|
@include button-variant(var(--btn-default-color), var(--btn-default-bg), var(--btn-primary-border));
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.primary {
|
2018-10-19 04:37:14 +08:00
|
|
|
@include button-variant(var(--btn-primary-color), var(--btn-primary-bg), var(--btn-primary-border));
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.success {
|
2018-10-19 04:37:14 +08:00
|
|
|
@include button-variant(var(--btn-success-color), var(--btn-success-bg), var(--btn-success-border));
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2021-03-26 05:22:50 +08:00
|
|
|
.warning {
|
|
|
|
@include button-variant(var(--btn-warning-color), var(--btn-warning-bg), var(--btn-warning-border));
|
|
|
|
}
|
|
|
|
|
2016-05-20 21:37:19 +08:00
|
|
|
.danger {
|
2018-10-19 04:37:14 +08:00
|
|
|
@include button-variant(var(--btn-danger-color), var(--btn-danger-bg), var(--btn-danger-border));
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2019-03-20 01:11:48 +08:00
|
|
|
.dark {
|
|
|
|
@include button-variant(var(--btn-dark-color), var(--btn-dark-bg), var(--btn-dark-border));
|
|
|
|
}
|
|
|
|
|
2021-03-26 05:22:50 +08:00
|
|
|
.offline {
|
|
|
|
@include button-variant(var(--btn-offline-color), var(--btn-offline-bg), var(--btn-offline-border));
|
|
|
|
}
|
|
|
|
|
2016-05-20 21:37:19 +08:00
|
|
|
/* Styles
|
|
|
|
* ==========
|
|
|
|
*/
|
|
|
|
|
|
|
|
.block {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ghost {
|
|
|
|
&.default {
|
2018-10-19 04:37:14 +08:00
|
|
|
@include button-ghost-variant(var(--btn-default-bg), var(--btn-default-color));
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.primary {
|
2018-10-19 04:37:14 +08:00
|
|
|
@include button-ghost-variant(var(--btn-primary-bg), var(--btn-primary-color));
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.success {
|
2018-10-19 04:37:14 +08:00
|
|
|
@include button-ghost-variant(var(--btn-success-bg), var(--btn-success-color));
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2021-03-26 05:22:50 +08:00
|
|
|
&.warning {
|
|
|
|
@include button-ghost-variant(var(--btn-warning-bg), var(--btn-warning-color));
|
|
|
|
}
|
|
|
|
|
2016-05-20 21:37:19 +08:00
|
|
|
&.danger {
|
2018-10-19 04:37:14 +08:00
|
|
|
@include button-ghost-variant(var(--btn-danger-bg), var(--btn-danger-color));
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
2019-03-20 01:11:48 +08:00
|
|
|
|
|
|
|
&.dark {
|
|
|
|
@include button-ghost-variant(var(--btn-dark-bg), var(--btn-dark-color));
|
|
|
|
}
|
2021-03-26 05:22:50 +08:00
|
|
|
|
|
|
|
&.offline {
|
|
|
|
@include button-ghost-variant(var(--btn-offline-bg), var(--btn-offline-color));
|
|
|
|
}
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
2017-02-02 03:40:00 +08:00
|
|
|
.circle {
|
2019-03-20 01:11:48 +08:00
|
|
|
--btn-sm-padding-x: calc(var(--sm-padding-x) / 2);
|
|
|
|
--btn-md-padding-x: calc(var(--md-padding-x) / 2);
|
|
|
|
--btn-lg-padding-x: calc(var(--lg-padding-x) / 2);
|
|
|
|
--btn-jumbo-padding-x: calc(var(--jumbo-padding-x) / 2);
|
2016-05-20 21:37:19 +08:00
|
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
|
|
&.sm {
|
2019-03-20 01:11:48 +08:00
|
|
|
padding: var(--btn-sm-padding-x);
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.md {
|
2019-03-20 01:11:48 +08:00
|
|
|
padding: var(--btn-md-padding-x);
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.lg {
|
2019-03-20 01:11:48 +08:00
|
|
|
padding: var(--btn-lg-padding-x);
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
2016-10-12 03:04:50 +08:00
|
|
|
|
|
|
|
&.jumbo {
|
2019-03-20 01:11:48 +08:00
|
|
|
padding: var(--btn-jumbo-padding-x);
|
2016-10-12 03:04:50 +08:00
|
|
|
}
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Sizes
|
|
|
|
* ==========
|
|
|
|
*/
|
|
|
|
|
|
|
|
.sm {
|
2018-10-19 04:37:14 +08:00
|
|
|
font-size: var(--btn-sm-font-size);
|
|
|
|
padding: var(--btn-sm-padding);
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.md {
|
2018-10-19 04:37:14 +08:00
|
|
|
font-size: var(--btn-md-font-size);
|
|
|
|
padding: var(--btn-md-padding);
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.lg {
|
2018-10-19 04:37:14 +08:00
|
|
|
font-size: var(--btn-lg-font-size);
|
|
|
|
padding: var(--btn-lg-padding);
|
2016-05-20 21:37:19 +08:00
|
|
|
}
|
2016-10-12 03:04:50 +08:00
|
|
|
|
|
|
|
.jumbo {
|
2018-10-19 04:37:14 +08:00
|
|
|
font-size: var(--btn-jumbo-font-size);
|
|
|
|
padding: var(--btn-jumbo-padding);
|
2016-10-12 03:04:50 +08:00
|
|
|
}
|