mirror of
https://github.com/Mr-Wiseguy/Zelda64Recomp.git
synced 2024-11-14 02:05:05 +01:00
81 lines
1.6 KiB
SCSS
81 lines
1.6 KiB
SCSS
@use 'sass:color';
|
|
|
|
@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, &:hover {
|
|
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%);
|
|
}
|
|
}
|
|
|
|
.button {
|
|
@extend %label-md;
|
|
@include create-button-variation($color-primary);
|
|
@include trans-colors;
|
|
|
|
display: block;
|
|
// leave 1dp room for border expansion
|
|
padding: space(24 - 1);
|
|
|
|
border-radius: $border-radius-md;
|
|
border-width: $border-width-thickness;
|
|
width: auto;
|
|
height: auto;
|
|
|
|
// Setting it by default for convenience
|
|
// &--primary {
|
|
// @include create-button-variation($color-primary);
|
|
// }
|
|
|
|
&--large {
|
|
@extend %label-lg;
|
|
}
|
|
|
|
&--secondary {
|
|
@include create-button-variation($color-secondary);
|
|
}
|
|
|
|
&--tertiary {
|
|
@include create-button-variation($color-text);
|
|
}
|
|
|
|
&--success {
|
|
@include create-button-variation($color-success);
|
|
}
|
|
|
|
&--error {
|
|
@include create-button-variation($color-error);
|
|
}
|
|
|
|
&--warning {
|
|
@include create-button-variation($color-warning);
|
|
}
|
|
|
|
&:not([disabled]) {
|
|
@extend %nav-all;
|
|
cursor: pointer;
|
|
}
|
|
|
|
&:disabled,&[disabled] {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
&__label {
|
|
width: auto;
|
|
height: auto;
|
|
}
|
|
}
|