2021-11-17 04:49:52 +01:00
|
|
|
/* Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
2021-10-31 00:29:22 +02:00
|
|
|
@use "fusion-vars";
|
|
|
|
|
2021-08-17 21:25:38 +02:00
|
|
|
@import "bootstrap/scss/functions";
|
|
|
|
@import "bootstrap/scss/variables";
|
2021-04-15 18:35:46 +02:00
|
|
|
|
2021-10-31 00:29:22 +02:00
|
|
|
@mixin impressed-shadow($intensity) {
|
|
|
|
box-shadow: inset 0 calc(var(--buttons-size) / 15) calc(var(--buttons-size) / 5)
|
|
|
|
rgba(black, $intensity);
|
|
|
|
}
|
|
|
|
|
2021-05-06 20:29:55 +02:00
|
|
|
@mixin btn-border-radius {
|
|
|
|
border-top-left-radius: var(--border-left-radius);
|
|
|
|
border-bottom-left-radius: var(--border-left-radius);
|
|
|
|
|
|
|
|
border-top-right-radius: var(--border-right-radius);
|
|
|
|
border-bottom-right-radius: var(--border-right-radius);
|
|
|
|
}
|
|
|
|
|
2021-04-16 18:14:09 +02:00
|
|
|
$btn-base-color-day: white;
|
|
|
|
|
|
|
|
@mixin btn-day-base {
|
|
|
|
color: var(--text-fg);
|
|
|
|
background-color: $btn-base-color-day;
|
|
|
|
border-color: var(--medium-border) !important;
|
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
|
2021-05-18 18:55:22 +02:00
|
|
|
@mixin btn-day(
|
|
|
|
$with-hover: true,
|
|
|
|
$with-active: true,
|
|
|
|
$with-disabled: true,
|
|
|
|
$with-margin: true
|
|
|
|
) {
|
2021-04-16 18:14:09 +02:00
|
|
|
.btn-day {
|
|
|
|
@include btn-day-base;
|
|
|
|
@content ($btn-base-color-day);
|
2021-04-15 18:35:46 +02:00
|
|
|
|
2021-05-18 17:50:18 +02:00
|
|
|
@if ($with-hover) {
|
2021-06-29 01:37:23 +02:00
|
|
|
&:hover,
|
|
|
|
&.hover {
|
2021-05-18 17:50:18 +02:00
|
|
|
background-color: darken($btn-base-color-day, 8%);
|
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
}
|
|
|
|
|
2021-05-18 17:50:18 +02:00
|
|
|
@if ($with-active) {
|
|
|
|
&:active,
|
|
|
|
&.active {
|
|
|
|
@include impressed-shadow(0.25);
|
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
|
2021-05-18 17:50:18 +02:00
|
|
|
&:active.active {
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@if ($with-disabled) {
|
|
|
|
&[disabled] {
|
2021-04-16 18:14:09 +02:00
|
|
|
background-color: $btn-base-color-day !important;
|
2021-04-15 18:35:46 +02:00
|
|
|
box-shadow: none !important;
|
|
|
|
}
|
|
|
|
}
|
2021-05-06 02:49:59 +02:00
|
|
|
|
|
|
|
@if ($with-margin) {
|
|
|
|
margin-left: -1px;
|
|
|
|
}
|
2021-04-14 15:45:14 +02:00
|
|
|
}
|
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
|
2021-10-31 00:29:22 +02:00
|
|
|
$btn-base-color-night: fusion-vars.$button-border;
|
2021-04-15 18:35:46 +02:00
|
|
|
|
2021-04-16 18:14:09 +02:00
|
|
|
@mixin btn-night-base {
|
|
|
|
color: var(--text-fg);
|
2021-10-31 00:29:22 +02:00
|
|
|
background: linear-gradient(
|
|
|
|
0deg,
|
|
|
|
fusion-vars.$button-gradient-start 0%,
|
|
|
|
fusion-vars.$button-gradient-end 100%
|
|
|
|
);
|
2021-04-16 18:14:09 +02:00
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
|
2021-05-18 18:55:22 +02:00
|
|
|
@mixin btn-night(
|
|
|
|
$with-hover: true,
|
|
|
|
$with-active: true,
|
|
|
|
$with-disabled: true,
|
|
|
|
$with-margin: true
|
|
|
|
) {
|
2021-04-16 18:14:09 +02:00
|
|
|
.btn-night {
|
|
|
|
@include btn-night-base;
|
|
|
|
@content ($btn-base-color-night);
|
2021-04-15 18:35:46 +02:00
|
|
|
|
2021-10-31 00:29:22 +02:00
|
|
|
box-shadow: 0 0 3px fusion-vars.$button-outline;
|
|
|
|
border: 1px solid fusion-vars.$button-border;
|
|
|
|
-webkit-appearance: none;
|
|
|
|
|
2021-05-18 17:50:18 +02:00
|
|
|
@if ($with-hover) {
|
2021-06-29 01:37:23 +02:00
|
|
|
&:hover,
|
|
|
|
&.hover {
|
2021-10-31 00:29:22 +02:00
|
|
|
background: linear-gradient(
|
|
|
|
0deg,
|
|
|
|
lighten(fusion-vars.$button-gradient-start, 8%) 0%,
|
|
|
|
lighten(fusion-vars.$button-gradient-end, 8%) 100%
|
|
|
|
);
|
|
|
|
border-color: lighten(fusion-vars.$button-border, 8%);
|
2021-05-18 17:50:18 +02:00
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
}
|
|
|
|
|
2021-10-31 00:29:22 +02:00
|
|
|
@if ($with-active) {
|
2021-05-18 17:50:18 +02:00
|
|
|
&:active,
|
|
|
|
&.active {
|
|
|
|
@include impressed-shadow(0.35);
|
|
|
|
border-color: darken($btn-base-color-night, 8%);
|
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
|
2021-05-18 17:50:18 +02:00
|
|
|
&:active.active {
|
|
|
|
box-shadow: none;
|
|
|
|
border-color: $btn-base-color-night;
|
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@if ($with-disabled) {
|
|
|
|
&[disabled] {
|
2021-04-16 18:14:09 +02:00
|
|
|
background-color: $btn-base-color-night !important;
|
2021-04-15 18:35:46 +02:00
|
|
|
box-shadow: none !important;
|
2021-04-16 18:14:09 +02:00
|
|
|
border-color: $btn-base-color-night !important;
|
2021-04-15 18:35:46 +02:00
|
|
|
}
|
|
|
|
}
|
2021-05-06 02:49:59 +02:00
|
|
|
|
|
|
|
@if ($with-margin) {
|
|
|
|
margin-left: 1px;
|
|
|
|
}
|
2021-04-15 18:35:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-16 18:14:09 +02:00
|
|
|
// should be similar to -webkit-focus-ring-color
|
2021-08-06 16:52:34 +02:00
|
|
|
$focus-color: rgba(21 97 174);
|
2021-04-16 18:14:09 +02:00
|
|
|
|
2021-06-05 00:40:55 +02:00
|
|
|
@function down-arrow($color) {
|
|
|
|
@return url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='transparent' stroke='#{$color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
|
|
|
|
}
|