dark mode

This commit is contained in:
cupcakearmy 2021-05-02 15:44:46 +02:00
parent f447cbea2d
commit 64d5953f60
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9
2 changed files with 20 additions and 2 deletions

View File

@ -8,7 +8,7 @@
font-family: 'Fira Mono', monospace; font-family: 'Fira Mono', monospace;
--ui-bg-0: #fefefe; --ui-bg-0: #fefefe;
--ui-bg-0-85: #ffffffd9; --ui-bg-0-85: #fefefed9;
--ui-bg-1: #eee; --ui-bg-1: #eee;
--ui-bg-2: #e2e2e2; --ui-bg-2: #e2e2e2;
--ui-text-0: #111; --ui-text-0: #111;
@ -19,6 +19,17 @@
--ui-anim: all 150ms ease; --ui-anim: all 150ms ease;
} }
@media (prefers-color-scheme: dark) {
:root {
--ui-bg-0: #111;
--ui-bg-0-85: #111111d9;
--ui-bg-1: #222;
--ui-bg-2: #282828;
--ui-text-0: #fefefe;
--ui-text-1: #eee;
}
}
.error-text { .error-text {
color: var(--ui-clr-error); color: var(--ui-clr-error);
} }
@ -53,6 +64,13 @@ button {
transition: var(--ui-anim); transition: var(--ui-anim);
font-family: inherit; font-family: inherit;
font-size: inherit; font-size: inherit;
background: inherit;
color: inherit;
}
*:disabled,
*[disabled='true'] {
opacity: 0.5;
} }
fieldset { fieldset {

View File

@ -32,7 +32,7 @@
</script> </script>
<label> <label>
<small> <small disabled={$$restProps.disabled}>
{label} {label}
</small> </small>
<input bind:value {...$$restProps} /> <input bind:value {...$$restProps} />