121 lines
1.8 KiB
SCSS
121 lines
1.8 KiB
SCSS
@use 'sass:color';
|
|
@use '../styles/variables' as v;
|
|
|
|
$horizontal-padding-small: 20px;
|
|
$horizontal-padding: 32px;
|
|
$icon-size: 22px;
|
|
$icon-size-small: 18px;
|
|
|
|
.base {
|
|
display: inline-block;
|
|
cursor: pointer;
|
|
border: none;
|
|
border-radius: 2px;
|
|
color: white;
|
|
transition: all 0.5s;
|
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
line-height: 1;
|
|
padding: 12px 24px;
|
|
|
|
&:has(.icon) {
|
|
padding: 12px;
|
|
}
|
|
|
|
&:disabled {
|
|
background: #ccc !important;
|
|
cursor: default;
|
|
}
|
|
|
|
&:focus {
|
|
outline: 0;
|
|
}
|
|
|
|
&::-moz-focus-inner {
|
|
border: 0;
|
|
padding: 0;
|
|
}
|
|
}
|
|
|
|
.icon {
|
|
display: block;
|
|
height: $icon-size;
|
|
width: $icon-size;
|
|
mask: no-repeat center / contain;
|
|
background: white;
|
|
|
|
.small & {
|
|
height: $icon-size-small;
|
|
width: $icon-size-small;
|
|
}
|
|
}
|
|
|
|
// default
|
|
.blue {
|
|
background: v.$color-blue;
|
|
|
|
&:hover,
|
|
&:focus,
|
|
&:active {
|
|
background: v.$color-blue-dark;
|
|
}
|
|
}
|
|
|
|
.red {
|
|
background: v.$color-red;
|
|
|
|
&:hover,
|
|
&:focus,
|
|
&:active {
|
|
background: v.$color-red-dark;
|
|
}
|
|
}
|
|
|
|
.orange {
|
|
background: v.$color-orange;
|
|
|
|
&:hover,
|
|
&:focus,
|
|
&:active {
|
|
background: color.adjust(v.$color-orange, $lightness: -20%);
|
|
}
|
|
}
|
|
|
|
.small {
|
|
&:not(:has(.icon)) {
|
|
height: v.$button-height-small;
|
|
line-height: v.$button-height-small;
|
|
padding: 0 $horizontal-padding-small;
|
|
}
|
|
|
|
&:has(.icon) {
|
|
padding: 10px;
|
|
|
|
img {
|
|
display: block;
|
|
height: 18px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.white {
|
|
background: white;
|
|
color: v.$color-blue;
|
|
border: 1px solid v.$color-blue;
|
|
line-height: v.$button-height - 2px;
|
|
padding: 0 $horizontal-padding - 1px;
|
|
|
|
&.red {
|
|
color: v.$color-red;
|
|
border: 1px solid v.$color-red;
|
|
}
|
|
|
|
&:hover {
|
|
background: #ccc;
|
|
}
|
|
|
|
&.small {
|
|
line-height: v.$button-height-small - 2px;
|
|
padding: 0 $horizontal-padding-small - 1px;
|
|
}
|
|
}
|