feat: Add dark theme via prefers-color-scheme

This commit is contained in:
ge 2022-09-29 10:46:51 +03:00
parent cde343d159
commit 921dd5d29d

View File

@ -1,5 +1,18 @@
:root {
--b: #000;
--w: #fff;
}
@media (prefers-color-scheme: dark) {
:root {
--b: #fff;
--w: #000;
}
}
body {
background-color: #fff;
color: var(--b);
background-color: var(--w);
font-family: 'Ubuntu Mono', monospace;
max-width: 720px;
margin: 0 auto;
@ -7,11 +20,14 @@ body {
}
main { margin: 4rem 2rem; }
.not-found, .bad-mime-type { margin-bottom: 2rem; }
a, a:visited { color: #000; }
a, a:visited { color: var(--b); }
img { width: 100%; }
.not-found, .bad-mime-type { margin-bottom: 2rem; }
.logo pre {
display: flex;
justify-content: center;
text-align: left;
}
/* Drag and Drop */
.drop-area {
@ -23,9 +39,7 @@ img { width: 100%; }
padding: 25px;
border: 3px dashed #e1e1e1;
}
.drop-area.dragover { border-color: #000; }
.drop-area.dragover { border-color: var(--b); }
.file-input {
position: absolute;
left: 0;
@ -36,7 +50,6 @@ img { width: 100%; }
align-items: center;
opacity: 0;
}
.file-input-label {
display: block;
margin-top: 1rem;
@ -46,17 +59,17 @@ img { width: 100%; }
.copy-to-clipboard {
display: flex;
margin: 2rem 0;
border: 1px solid #000000;
border: 1px solid var(--b);
}
.copy-to-clipboard input[type=text] {
flex: 50%;
width: 100%;
padding: 12px 20px;
border: none;
outline: none;
background-color: var(--w);
color: var(--b);
}
.copy-to-clipboard button {
padding: 12px 20px;
margin: 0;
@ -64,8 +77,8 @@ img { width: 100%; }
cursor: pointer;
text-align: center;
border: none;
background-color: #000000;
color: #ffffff;
background-color: var(--b);
color: var(--w);
}
/* cURL command */
@ -73,13 +86,15 @@ img { width: 100%; }
text-align: left;
padding: 12px 20px;
font-size: 14px;
background: #000000;
color: #ffffff;
background: var(--b);
color: var(--w);
overflow-x: auto;
}
.logo pre {
display: flex;
justify-content: center;
text-align: left;
/* SVG */
svg {
color: var(--b);
}
svg path {
stroke: currentcolor;
}