modo oscuro

fixes #14
This commit is contained in:
Cat /dev/Nulo 2023-03-26 00:56:36 +00:00
parent 9a01fc8004
commit d1f9483909
5 changed files with 44 additions and 16 deletions

View file

@ -8,6 +8,12 @@
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
--background: white;
--foreground: black;
--transparentish: rgba(0, 0, 0, 0.2);
--accent-bg: #cbd5e1;
--accent-fg: #1e293b;
} }
*, *,
@ -21,4 +27,20 @@ body,
main { main {
margin: 0; margin: 0;
min-height: 100vh; min-height: 100vh;
background: var(--background);
color: var(--foreground);
}
a {
color: var(--accent-fg);
}
@media (prefers-color-scheme: dark) {
:root {
--background: #18181b;
--foreground: #d4d4d8;
--transparentish: rgba(255, 255, 255, 0.2);
--accent-bg: #334155;
--accent-fg: #94a3b8;
}
} }

View file

@ -106,8 +106,8 @@
.backdrop { .backdrop {
position: fixed; position: fixed;
inset: 0; inset: 0;
background: #6b7280; background: var(--background);
opacity: 0.75; opacity: 0.9;
} }
.content-alignment { .content-alignment {
@ -123,11 +123,16 @@
.content { .content {
overflow-y: none; overflow-y: none;
background: white; background: var(--background);
padding: 16px 20px; padding: 16px 20px;
border-radius: 16px; border-radius: 16px;
min-width: 50%; min-width: 50%;
min-height: 50%; min-height: 50%;
--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
0 8px 10px -6px rgb(0 0 0 / 0.1);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
} }
h3 { h3 {

View file

@ -181,8 +181,8 @@ transform: scale(${1 / viewport.scale});
/* https://wicg.github.io/visual-viewport/examples/fixed-to-keyboard.html */ /* https://wicg.github.io/visual-viewport/examples/fixed-to-keyboard.html */
transform-origin: left bottom; transform-origin: left bottom;
background: white; background: var(--background);
border-top: 1px solid #ccc; border-top: 1px solid var(--accent-bg);
width: 100%; width: 100%;
visibility: visible; visibility: visible;

View file

@ -32,10 +32,10 @@
/* https://stackoverflow.com/a/64553121 */ /* https://stackoverflow.com/a/64553121 */
@media (hover: hover) and (pointer: fine) { @media (hover: hover) and (pointer: fine) {
button:hover { button:hover {
background: #eee; background: var(--transparentish);
} }
} }
button.active { button.active {
background: #ddd; background: var(--accent-bg);
} }
</style> </style>

View file

@ -13,8 +13,8 @@
position: sticky; position: sticky;
top: 0px; top: 0px;
z-index: 69; z-index: 69;
background: white; background: var(--background, white);
border-bottom: 1px solid #bbb; border-bottom: 1px solid var(--accent-bg);
} }
.editor .menubar button { .editor .menubar button {
@ -26,14 +26,15 @@
padding: 0.4em 0.6em; padding: 0.4em 0.6em;
margin: 0.2em; margin: 0.2em;
transition: all 0.2s; transition: all 0.2s;
} color: var(--foreground);
.editor .menubar button.active {
background: #ddd;
} }
.editor .menubar button:hover { .editor .menubar button:hover {
background: #eee; background: var(--transparentish);
}
.editor .menubar button.active {
background: var(--accent-bg);
} }
.editor .menubar button svg { .editor .menubar button svg {
@ -67,8 +68,8 @@
} }
.ProseMirror blockquote { .ProseMirror blockquote {
background-color: #f5f5f5; background-color: var(--transparentish);
border-left: 5px solid #dbdbdb; border-left: 5px solid var(--foreground);
padding: 1.25em 1.5em; padding: 1.25em 1.5em;
margin: 0.5em; margin: 0.5em;
} }