Color ButtonDropdown background in var(--bg-color) regardless of theme

This commit is contained in:
Henrik Giesel 2021-04-16 18:36:54 +02:00
parent caa052e37e
commit d66d229d15
2 changed files with 11 additions and 12 deletions

View File

@ -3,8 +3,6 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import { getContext } from "svelte";
import { nightModeKey } from "./contextKeys";
import type { ToolbarItem } from "./types";
import ButtonGroup from "./ButtonGroup.svelte";
@ -12,18 +10,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let className = "";
function extendClassName(className: string): string {
return `dropdown-menu py-1 mb-0 ${
nightMode ? "btn-dropdown-menu--night-mode " : ""
}${className}`;
return `dropdown-menu btn-dropdown-menu py-1 mb-0 ${className}`;
}
export let buttons: ToolbarItem[];
const nightMode = getContext(nightModeKey);
</script>
<style>
:global(.btn-dropdown-menu--night-mode) {
:global(.btn-dropdown-menu) {
background-color: var(--window-bg);
border-color: var(--medium-border);
}

View File

@ -23,6 +23,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
button {
display: flex;
justify-content: space-between;
}
.btn-day {
color: black;
&:active {
background-color: button.$focus-color;
@ -30,10 +34,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
}
}
.btn-day {
color: black;
}
.btn-night {
color: white;
@ -41,6 +41,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
&:focus {
@include button.btn-night-base;
}
&:active {
background-color: button.$focus-color;
color: white;
}
}
span {