2024-08-10 23:13:20 +02:00
|
|
|
/* Variables */
|
|
|
|
|
|
|
|
:root {
|
|
|
|
--color-text: #111;
|
|
|
|
--color-error: #db344b;
|
|
|
|
|
|
|
|
--color-panel-border: rgba(0, 0, 0, 20%);
|
|
|
|
--color-panel-background: #fff;
|
|
|
|
|
|
|
|
--panel-border-radius: 16px;
|
|
|
|
--panel-box-shadow: 0 0 0 1px var(--color-panel-border);
|
|
|
|
--panel-padding: 12px;
|
|
|
|
--dialog-backdrop: rgba(255, 255, 255, 0.5);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Reset */
|
|
|
|
|
|
|
|
body {
|
|
|
|
margin: 0;
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
|
|
|
|
color: var(--color-text);
|
|
|
|
line-height: 1.4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Fonts */
|
|
|
|
|
|
|
|
@font-face {
|
|
|
|
font-family: "Fira Sans";
|
|
|
|
src:
|
|
|
|
local("Fira Sans Regular"),
|
|
|
|
url("font/FiraSans-Regular.ttf");
|
|
|
|
font-weight: 400;
|
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
|
|
|
font-family: "Fira Sans";
|
|
|
|
src:
|
|
|
|
local("Fira Sans Bold"),
|
|
|
|
url("font/FiraSans-Bold.ttf");
|
|
|
|
font-weight: 700;
|
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
|
|
|
font-family: "Fira Code";
|
|
|
|
src:
|
|
|
|
local("Fira Code"),
|
|
|
|
url("font/FiraCode-VariableFont_wght.ttf");
|
|
|
|
font-weight: 400;
|
|
|
|
}
|
|
|
|
|
|
|
|
:root {
|
|
|
|
font-size: 87.5%;
|
|
|
|
font-family: "Fira Sans", sans-serif;
|
|
|
|
}
|
|
|
|
|
|
|
|
button, textarea, input {
|
|
|
|
font-size: inherit;
|
|
|
|
font-family: inherit;
|
|
|
|
}
|
|
|
|
|
2024-08-24 17:47:47 +02:00
|
|
|
pre, code, textarea {
|
2024-08-19 23:56:11 +02:00
|
|
|
font-family: "Fira Code", monospace;
|
|
|
|
}
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
/* Main container layout */
|
|
|
|
|
|
|
|
main {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&>rkgk-canvas-renderer {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&>rkgk-reticle-renderer {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
&>rkgk-brush-editor {
|
|
|
|
width: 384px;
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
margin: 16px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Buttons */
|
|
|
|
|
|
|
|
button {
|
|
|
|
border: 1px solid var(--color-panel-border);
|
|
|
|
border-radius: 9999px;
|
|
|
|
padding: 0.5rem 1.5rem;
|
|
|
|
background-color: var(--color-panel-background);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Text areas */
|
|
|
|
|
|
|
|
input {
|
|
|
|
border: none;
|
|
|
|
border-bottom: 1px solid var(--color-panel-border);
|
|
|
|
}
|
|
|
|
|
2024-08-24 17:47:47 +02:00
|
|
|
*[contenteditable]:focus, input:focus, textarea:focus {
|
2024-08-10 23:13:20 +02:00
|
|
|
border-radius: 2px;
|
|
|
|
outline: 1px solid #40b1f4;
|
|
|
|
outline-offset: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Modal dialogs */
|
|
|
|
|
|
|
|
dialog:not([open]) {
|
|
|
|
/* Weird this doesn't seem to work by default. */
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
dialog::backdrop {
|
|
|
|
background-color: var(--dialog-backdrop);
|
|
|
|
backdrop-filter: blur(8px);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Throbbers */
|
|
|
|
|
|
|
|
rkgk-throbber {
|
|
|
|
display: inline;
|
|
|
|
|
|
|
|
&.loading {
|
|
|
|
&::before {
|
|
|
|
/* This could use an entertaining animation. */
|
|
|
|
content: "Please wait...";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.error {
|
|
|
|
/* This could use an icon. */
|
|
|
|
color: var(--color-error);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Panels */
|
|
|
|
|
|
|
|
.rkgk-panel {
|
|
|
|
display: block;
|
|
|
|
background: var(--color-panel-background);
|
|
|
|
padding: var(--panel-border-radius);
|
|
|
|
border: none;
|
|
|
|
border-radius: 16px;
|
|
|
|
box-shadow: var(--panel-box-shadow);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Canvas renderer */
|
|
|
|
|
|
|
|
rkgk-canvas-renderer {
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
&>canvas {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Reticle renderer */
|
|
|
|
|
|
|
|
rkgk-reticle-renderer {
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
&>.reticles {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-15 20:01:23 +02:00
|
|
|
rkgk-reticle-cursor {
|
|
|
|
--color: black; /* Overridden by JavaScript to set a per-user color. */
|
2024-08-10 23:13:20 +02:00
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
&>.container {
|
|
|
|
&>.arrow {
|
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
background-color: var(--color);
|
|
|
|
clip-path: path("M 0,0 L 13,13 L 6,13 L 0,19 Z");
|
|
|
|
}
|
|
|
|
|
|
|
|
&>.nickname {
|
|
|
|
position: absolute;
|
|
|
|
top: 20px;
|
|
|
|
left: 8px;
|
|
|
|
|
|
|
|
color: white;
|
|
|
|
background-color: var(--color);
|
|
|
|
padding: 1px 6px;
|
|
|
|
border-radius: 9999px;
|
|
|
|
text-align: center;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Brush editor */
|
|
|
|
|
|
|
|
rkgk-brush-editor {
|
|
|
|
&>.text-area {
|
|
|
|
width: 100%;
|
|
|
|
margin: 0;
|
2024-08-24 17:54:43 +02:00
|
|
|
padding-top: 0.4em; /* to account for line-height */
|
2024-08-10 23:13:20 +02:00
|
|
|
resize: none;
|
2024-08-19 23:56:11 +02:00
|
|
|
white-space: pre-wrap;
|
2024-08-24 17:47:47 +02:00
|
|
|
border: none;
|
2024-08-24 17:54:43 +02:00
|
|
|
overflow: hidden;
|
|
|
|
box-sizing: border-box;
|
2024-08-19 23:56:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&>.errors:empty, &>.error-header:empty {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&>.error-header {
|
|
|
|
margin-top: 1em;
|
|
|
|
margin-bottom: 0;
|
|
|
|
font-size: 1rem;
|
|
|
|
color: var(--color-error);
|
|
|
|
}
|
|
|
|
|
|
|
|
&>.errors {
|
|
|
|
margin: 0;
|
|
|
|
color: var(--color-error);
|
|
|
|
white-space: pre-wrap;
|
2024-08-10 23:13:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Welcome screen */
|
|
|
|
|
|
|
|
rkgk-welcome {
|
|
|
|
&>dialog {
|
|
|
|
h3 {
|
|
|
|
margin: 0.5rem 0;
|
|
|
|
font-size: 2rem;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|