moth/theme/basic.css

225 lines
3.8 KiB
CSS
Raw Normal View History

2023-09-13 19:10:25 -06:00
/* Color palette: http://paletton.com/#uid=33x0u0klrl-4ON9dhtKtAdqMQ4T */
2024-04-01 16:46:45 -06:00
:root {
--bg: #010e19;
2024-04-02 13:15:45 -06:00
--fg: #edd488;
2024-04-01 16:46:45 -06:00
--bg-main: #000d;
--heading: #cb2408cc;
--bg-heading1: #cb240844;
--fg-link: #b9cbd8;
--bg-input: #ccc4;
--bg-input-hover: #8884;
--bg-notification: #ac8f3944;
--bg-error: #f00;
--fg-error: white;
--bg-category: #ccc4;
--bg-input-invalid: #800;
--fg-input-invalid: white;
--bg-mothball: #ccc;
--bg-debug: #cccc;
--fg-debug: black;
--bg-toast: #333;
--fg-toast: #eee;
--box-toast: #0b0;
}
@media (prefers-color-scheme: light) {
/* We uses the alpha channel to apply hue tinting to elements, to get a
* similar effect in light or dark mode. That means there aren't a whole lot of
* things to change between light and dark mode.
*/
:root {
--bg: #b9cbd8;
--fg: black;
--bg-main: #fffd;
--fg-link: #092b45;
}
}
body {
font-family: sans-serif;
2024-04-01 16:46:45 -06:00
background: var(--bg) url("bg.png") center fixed;
background-size: cover;
2023-09-12 17:30:36 -06:00
background-blend-mode: soft-light;
2024-04-01 16:46:45 -06:00
background-color: var(--bg);
color: var(--fg);
2023-09-12 17:30:36 -06:00
}
canvas.wallpaper {
position: fixed;
display: block;
z-index: -1000;
top: 0;
left: 0;
height: 100vh;
width: 100vw;
opacity: 0.2;
image-rendering: pixelated;
}
2024-04-08 17:22:35 -06:00
@media (prefers-reduced-motion) {
canvas.wallpaper {
display: none;
}
}
main {
max-width: 40em;
margin: 1em auto;
padding: 1px 3px;
border-radius: 5px;
2024-04-01 16:46:45 -06:00
background: var(--bg-main);
2023-09-13 19:10:25 -06:00
}
h1, h2, h3, h4, h5, h6 {
2024-04-01 16:46:45 -06:00
color: var(--heading);
}
h1 {
2024-04-01 16:46:45 -06:00
background: var(--bg-heading1);
padding: 3px;
2018-09-18 18:22:03 -06:00
}
p {
margin: 1em 0em;
}
2023-09-13 19:10:25 -06:00
a:any-link {
2024-04-01 16:46:45 -06:00
color: var(--fg-link);
2023-09-13 19:10:25 -06:00
}
2018-09-18 18:22:03 -06:00
form, pre {
margin: 1em;
2023-09-12 19:30:53 -06:00
overflow-x: auto;
2018-09-18 18:22:03 -06:00
}
2018-10-02 19:21:54 -06:00
input, select {
2018-09-18 18:22:03 -06:00
padding: 0.6em;
margin: 0.2em;
2018-10-09 16:05:02 -06:00
max-width: 30em;
2018-09-18 18:22:03 -06:00
}
2023-09-13 19:24:05 -06:00
input {
2024-04-01 16:46:45 -06:00
background-color: var(--bg-input);
2023-09-13 19:24:05 -06:00
color: inherit;
}
2023-09-28 18:16:18 -06:00
input:hover {
2024-04-01 16:46:45 -06:00
background-color: var(--bg-input-hover);
2023-09-28 18:16:18 -06:00
}
input:active {
background-color: inherit;
}
.notification, .error {
padding: 0 1em;
border-radius: 8px;
2018-09-18 18:22:03 -06:00
}
2023-09-13 19:10:25 -06:00
.notification {
2024-04-01 16:46:45 -06:00
background: var(--bg-notification);
2023-09-13 19:10:25 -06:00
}
.error {
2024-04-01 16:46:45 -06:00
background: var(--bg-error);
color: var(--fg-error);
2023-09-13 19:10:25 -06:00
}
.hidden {
display: none;
}
/** Puzzles list */
.category {
margin: 5px 0;
2024-04-01 16:46:45 -06:00
background: var(--bg-category);
}
.category h2 {
margin: 0 0.2em;
}
2023-09-14 17:42:02 -06:00
.category .solved {
text-decoration: line-through;
}
2018-09-18 18:22:03 -06:00
nav ul, .category ul {
margin: 0;
padding: 0.2em 1em;
display: flex;
flex-wrap: wrap;
gap: 8px 16px;
2018-09-18 18:22:03 -06:00
}
nav li, .category li {
display: inline;
}
.category li.entitled {
flex-basis: 100%;
}
.mothball {
float: right;
text-decoration: none;
border-radius: 5px;
2024-04-01 16:46:45 -06:00
background: var(--bg-mothball);
padding: 4px 8px;
margin: 5px;
}
/** Puzzle content */
#puzzle {
border-bottom: solid;
padding: 0 0.5em;
}
#puzzle img {
max-width: 100%;
}
input:invalid {
2024-04-01 16:46:45 -06:00
background-color: var(--bg-input-invalid);
color: var(--fg-input-invalid);
}
2023-09-12 17:32:34 -06:00
.answer_ok {
cursor: help;
}
2023-09-15 16:09:08 -06:00
/** Development mode information */
.debug {
overflow: auto;
padding: 1em;
border-radius: 10px;
margin: 2em auto;
2024-04-01 16:46:45 -06:00
background: var(--bg-debug);
color: var(--fg-debug);
}
.debug dt {
font-weight: bold;
2019-02-22 17:43:04 -07:00
}
2020-02-29 17:12:35 -07:00
/** Draggable items, from the draggable plugin */
2020-02-29 17:12:35 -07:00
li[draggable]::before {
content: "↕";
padding: 0.5em;
cursor: move;
}
li[draggable] {
list-style: none;
}
[draggable].moving {
opacity: 0.4;
}
[draggable].over {
border: 1px white dashed;
}
/** Toasts are little pop-up informational messages. */
.toasts {
position: fixed;
z-index: 100;
bottom: 10px;
left: 10px;
text-align: center;
width: calc(100% - 20px);
display: flex;
flex-direction: column;
}
.toast {
border-radius: 0.5em;
padding: 0.2em 2em;
animation: fadeIn ease 1s;
margin: 2px auto;
2024-04-01 16:46:45 -06:00
background: var(--bg-toast);
color: var(--fg-toast);
box-shadow: 0px 0px 8px 0px var(--box-toast);
}
@keyframes fadeIn {
0% { opacity: 0; }
100% { opacity: 1; }
2020-02-29 17:12:35 -07:00
}