2024-01-07 21:33:22 +00:00
|
|
|
@use 'sass:color';
|
2024-01-07 00:04:28 +00:00
|
|
|
|
2024-01-08 00:23:05 +00:00
|
|
|
@mixin create-button-variation($base-col) {
|
|
|
|
background-color: rgba($base-col, 0.05);
|
|
|
|
color: $color-text-dim;
|
|
|
|
border-color: rgba($base-col, 0.8);
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
color: $color-text;
|
|
|
|
border-color: $base-col;
|
|
|
|
background-color: rgba($base-col, 0.3);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled,&[disabled] {
|
|
|
|
color: $color-text-inactive;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-color: rgba($base-col, 0.2);
|
|
|
|
color: color.scale($color-text, $lightness: 20%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-07 00:04:28 +00:00
|
|
|
.button {
|
2024-01-08 00:23:05 +00:00
|
|
|
@extend %label-lg;
|
|
|
|
@include create-button-variation($color-primary);
|
|
|
|
|
2024-01-07 00:04:28 +00:00
|
|
|
display: block;
|
2024-01-08 00:26:40 +00:00
|
|
|
// leave 1dp room for border expansion
|
|
|
|
padding: space(24 - 1);
|
2024-01-08 00:23:05 +00:00
|
|
|
|
2024-01-07 21:33:22 +00:00
|
|
|
border-radius: $border-radius-md;
|
2024-01-19 19:06:06 +00:00
|
|
|
border-width: $border-width-thickness;
|
2024-01-07 21:33:22 +00:00
|
|
|
width: auto;
|
|
|
|
height: auto;
|
2024-01-07 00:04:28 +00:00
|
|
|
|
2024-01-08 00:23:05 +00:00
|
|
|
// Setting it by default for convenience
|
|
|
|
// &--primary {
|
|
|
|
// @include create-button-variation($color-primary);
|
|
|
|
// }
|
|
|
|
|
|
|
|
&--secondary {
|
|
|
|
@include create-button-variation($color-secondary);
|
2024-01-07 00:04:28 +00:00
|
|
|
}
|
|
|
|
|
2024-01-08 00:23:05 +00:00
|
|
|
&--tertiary {
|
|
|
|
@include create-button-variation($color-text);
|
2024-01-07 00:04:28 +00:00
|
|
|
}
|
|
|
|
|
2024-01-08 00:23:05 +00:00
|
|
|
&--success {
|
|
|
|
@include create-button-variation($color-success);
|
2024-01-07 00:04:28 +00:00
|
|
|
}
|
|
|
|
|
2024-01-08 00:23:05 +00:00
|
|
|
&--error {
|
|
|
|
@include create-button-variation($color-error);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--warning {
|
|
|
|
@include create-button-variation($color-warning);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not([disabled]) {
|
|
|
|
@extend %nav-all;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled,&[disabled] {
|
|
|
|
opacity: 0.5;
|
2024-01-07 21:33:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__label {
|
|
|
|
width: auto;
|
|
|
|
height: auto;
|
2024-01-07 00:04:28 +00:00
|
|
|
}
|
|
|
|
}
|