2024-08-10 23:13:20 +02:00
|
|
|
/* Variables */
|
|
|
|
|
|
|
|
:root {
|
|
|
|
--color-text: #111;
|
|
|
|
--color-error: #db344b;
|
2024-08-24 20:09:52 +02:00
|
|
|
|
|
|
|
--color-brand-blue: #40b1f4;
|
2024-08-10 23:13:20 +02:00
|
|
|
|
|
|
|
--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;
|
|
|
|
}
|
|
|
|
|
2024-08-25 12:53:53 +02:00
|
|
|
@font-face {
|
|
|
|
font-family: "Fira Sans";
|
|
|
|
src:
|
|
|
|
local("Fira Sans Italic"),
|
|
|
|
url("font/FiraSans-Italic.ttf");
|
|
|
|
font-weight: 400;
|
|
|
|
font-style: italic;
|
|
|
|
}
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
@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;
|
|
|
|
|
2024-08-24 20:09:52 +02:00
|
|
|
&>.fullscreen {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
2024-08-25 14:36:45 +02:00
|
|
|
&>.panels {
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 16px;
|
|
|
|
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: [left] 1fr [right] 384px;
|
|
|
|
|
|
|
|
/* Pass all events through. Children may receive events as normal. */
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
&>* {
|
|
|
|
pointer-events: all;
|
|
|
|
}
|
|
|
|
|
|
|
|
&>rkgk-brush-editor {
|
|
|
|
grid-column: right / right;
|
|
|
|
height: fit-content;
|
|
|
|
max-height: 100%;
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
&>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;
|
|
|
|
}
|
2024-08-24 20:09:52 +02:00
|
|
|
|
|
|
|
&>#js-loading {
|
|
|
|
background-color: var(--color-panel-background);
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
2024-08-10 23:13:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 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-25 12:53:53 +02:00
|
|
|
*:focus {
|
2024-08-10 23:13:20 +02:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2024-08-25 12:53:53 +02:00
|
|
|
/* Details */
|
|
|
|
|
|
|
|
details>summary {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
/* Throbbers */
|
|
|
|
|
2024-08-24 20:09:52 +02:00
|
|
|
@keyframes rkgk-throbber-loading {
|
|
|
|
0% {
|
|
|
|
clip-path: inset(0% 100% 0% 0%);
|
|
|
|
animation-timing-function: cubic-bezier(0.12, 0, 0.39, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
50% {
|
|
|
|
clip-path: inset(0% 0% 0% 0%);
|
|
|
|
animation-timing-function: cubic-bezier(0.61, 1, 0.88, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
100% {
|
|
|
|
clip-path: inset(0% 0% 0% 100%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
rkgk-throbber {
|
|
|
|
display: inline;
|
|
|
|
|
|
|
|
&.loading {
|
2024-08-24 20:09:52 +02:00
|
|
|
display: block;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
background-color: var(--color-brand-blue);
|
|
|
|
animation: infinite alternate rkgk-throbber-loading;
|
|
|
|
/* I wonder how many people will get _that_ reference. */
|
|
|
|
animation-duration: calc(60s / 141.98);
|
2024-08-10 23:13:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&.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);
|
2024-08-25 14:36:45 +02:00
|
|
|
box-sizing: border-box;
|
2024-08-10 23:13:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 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 {
|
2024-08-25 14:36:45 +02:00
|
|
|
display: block;
|
2024-08-10 23:13:20 +02:00
|
|
|
width: 100%;
|
|
|
|
margin: 0;
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-24 20:09:52 +02:00
|
|
|
|
|
|
|
/* Connection status dialogs */
|
|
|
|
|
|
|
|
rkgk-connection-status {
|
2024-08-25 12:53:53 +02:00
|
|
|
&>dialog[name='logging-in-dialog'][open], &>dialog[name='disconnected-dialog'][open] {
|
2024-08-24 20:09:52 +02:00
|
|
|
border: none;
|
|
|
|
outline: none;
|
|
|
|
background: none;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
gap: 8px;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2024-08-25 12:53:53 +02:00
|
|
|
|
|
|
|
&>dialog[name='error-dialog'][open] {
|
|
|
|
& textarea[name='error-text'] {
|
|
|
|
box-sizing: border-box;
|
|
|
|
width: 100%;
|
|
|
|
resize: none;
|
|
|
|
border: 1px solid var(--color-panel-border);
|
|
|
|
padding: 4px;
|
|
|
|
}
|
|
|
|
}
|
2024-08-24 20:09:52 +02:00
|
|
|
}
|