vodular/public/style/main.css

237 lines
4.5 KiB
CSS

:root {
--bg-0: #101010;
--bg-1: #181818;
--bg-2: #282828;
--bg-3: #404040;
--fg-0: #b0b0b0;
--fg-1: #c0c0c0;
--fg-2: #d0d0d0;
--fg-3: #e0e0e0;
--col-shadow-0: #0002;
--col-shadow-1: #0004;
--col-shadow-2: #0006;
--col-highlight-0: #ffffff08;
--col-highlight-1: #fff1;
--col-highlight-2: #fff2;
--col-new: #b3ee5b;
--col-on-new: #1b2013;
--col-save: #6fd7ff;
--col-on-save: #283f48;
--col-delete: #ff7171;
--col-on-delete: #371919;
--col-warn: #ffe86a;
--col-on-warn: var(--bg-0);
--col-warn-hover: #ffec81;
--col-link: #a3ef81;
--shadow-sm:
0 1px 2px var(--col-shadow-2),
inset 0 1px 1px var(--col-highlight-2);
--shadow-md:
0 2px 4px var(--col-shadow-1),
inset 0 2px 2px var(--col-highlight-1);
--shadow-lg:
0 4px 8px var(--col-shadow-0),
inset 0 4px 4px var(--col-highlight-0);
}
@media (prefers-color-scheme: light) {
:root {
--bg-0: #e8e8e8;
--bg-1: #f0f0f0;
--bg-2: #f8f8f8;
--bg-3: #ffffff;
--fg-0: #606060;
--fg-1: #404040;
--fg-2: #303030;
--fg-3: #202020;
--col-shadow-0: #0002;
--col-shadow-1: #0004;
--col-shadow-2: #0008;
--col-highlight-0: #fff2;
--col-highlight-1: #fff4;
--col-highlight-2: #fff8;
--col-warn: #ffe86a;
--col-on-warn: var(--fg-3);
--col-warn-hover: #ffec81;
--col-link: #3c7423;
}
}
body {
width: 100%;
min-height: 100vh;
margin: 0;
padding: 0;
font-family: "Inter", sans-serif;
font-size: 16px;
color: var(--fg-0);
background-color: var(--bg-0);
transition: background .1s ease-out, color .1s ease-out;
}
h1, h2, h3, h4, h5, h6 {
color: var(--fg-3);
}
main {
width: 900px;
max-width: calc(100% - 2em);
height: fit-content;
min-height: calc(100vh - 2em);
margin: 0 auto;
padding: 1em;
}
a {
color: var(--col-link);
text-decoration: none;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
transition: color .1s ease-out, background-color .1s ease-out;
}
a:hover {
text-decoration: underline;
}
img.icon {
height: .8em;
transition: filter .1s ease-out;
}
code {
background: #303030;
color: #f0f0f0;
padding: .23em .3em;
border-radius: 4px;
}
a.delete:not(.button) {
color: #d22828;
}
.button, button {
padding: .5em .8em;
font-family: inherit;
font-size: inherit;
color: inherit;
background-color: var(--bg-2);
border: none;
border-radius: 10em;
box-shadow: var(--shadow-sm);
font-weight: 500;
transition: background .1s ease-out, color .1s ease-out;
cursor: pointer;
user-select: none;
}
button:hover, .button:hover {
background: #fff;
}
button:active, .button:active {
background: #d0d0d0;
}
.button.new, button.new {
color: var(--col-on-new);
background-color: var(--col-new);
}
.button.save, button.save {
color: var(--col-on-save);
background-color: var(--col-save);
}
.button.delete, button.delete {
color: var(--col-on-delete);
background-color: var(--col-delete);
}
.button:hover, button:hover {
color: var(--bg-3);
background-color: var(--fg-3);
}
.button:active, button:active {
color: var(--bg-2);
background-color: var(--fg-0);
}
.button[disabled], button[disabled] {
color: var(--fg-0) !important;
background-color: var(--bg-3) !important;
opacity: .5;
cursor: default !important;
}
form {
width: 100%;
display: block;
color: var(--fg-0);
}
form label {
width: 100%;
margin: 1rem 0 .5rem 0;
display: block;
}
form input {
width: auto;
max-width: 100%;
margin: .5em 0;
padding: .3em .5em;
display: block;
border-radius: 4px;
border: 1px solid #808080;
font-size: inherit;
font-family: inherit;
color: inherit;
background-color: var(--bg-0);
}
form input[type="text"],
form input[type="password"] {
width: 16em;
}
form input[type="number"] {
width: 2em;
}
input[disabled] {
opacity: .5;
cursor: not-allowed;
}
@media screen and (max-width: 720px) {
main {
padding-top: 0;
}
body {
width: 100%;
margin: 0;
font-size: 16px;
}
}
header {
width: 900px;
max-width: calc(100% - 2em);
margin: 0 auto;
padding: 1em;
nav a {
padding: .2em .4em;
border-radius: 4px;
background-color: var(--bg-1);
box-shadow: var(--shadow-sm);
}
}