2024-08-26 23:25:36 +02:00
|
|
|
/* index.css - styles for index.html and generally main parts of the app
|
|
|
|
For shared styles (such as color definitions) check out base.css. */
|
2024-08-19 23:56:11 +02:00
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
/* Main container layout */
|
|
|
|
|
2024-08-27 14:23:53 +02:00
|
|
|
body {
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
}
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
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 {
|
2024-09-02 22:37:50 +02:00
|
|
|
--right-width: 384px; /* Overridden by JavaScript */
|
|
|
|
|
2024-08-25 14:36:45 +02:00
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 16px;
|
|
|
|
|
|
|
|
display: grid;
|
2024-09-02 22:37:50 +02:00
|
|
|
grid-template-columns: [left] 1fr [right-resize] auto [right] var(--right-width);
|
2024-08-25 14:36:45 +02:00
|
|
|
|
|
|
|
/* Pass all events through. Children may receive events as normal. */
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
&>* {
|
|
|
|
pointer-events: all;
|
|
|
|
}
|
|
|
|
|
2024-09-02 22:37:50 +02:00
|
|
|
&>.right {
|
2024-08-25 14:36:45 +02:00
|
|
|
grid-column: right / right;
|
|
|
|
height: fit-content;
|
2024-09-02 22:37:50 +02:00
|
|
|
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: stretch;
|
|
|
|
|
|
|
|
&>rkgk-resize-handle {
|
|
|
|
flex-shrink: 0;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
&>rkgk-brush-editor {
|
|
|
|
max-height: 100%;
|
|
|
|
overflow: auto;
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
2024-08-25 14:36:45 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2024-09-02 22:37:50 +02:00
|
|
|
/* Resize handle */
|
|
|
|
|
|
|
|
rkgk-resize-handle {
|
|
|
|
&[data-direction="vertical"] {
|
|
|
|
display: block;
|
|
|
|
width: 16px;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
cursor: col-resize;
|
|
|
|
|
|
|
|
&>.visual {
|
|
|
|
width: 2px;
|
|
|
|
height: 100%;
|
|
|
|
background-color: var(--color-brand-blue);
|
|
|
|
margin: 0 auto;
|
|
|
|
opacity: 0%;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover>.visual, &.dragging>.visual {
|
|
|
|
opacity: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
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;
|
2024-09-01 20:02:47 +02:00
|
|
|
width: max-content;
|
2024-08-10 23:13:20 +02:00
|
|
|
|
|
|
|
color: white;
|
|
|
|
background-color: var(--color);
|
|
|
|
padding: 1px 6px;
|
|
|
|
border-radius: 9999px;
|
|
|
|
text-align: center;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Brush editor */
|
|
|
|
|
|
|
|
rkgk-brush-editor {
|
2024-08-27 14:13:03 +02:00
|
|
|
padding: 12px;
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
&>.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
|
|
|
}
|
2024-08-27 14:13:03 +02:00
|
|
|
|
|
|
|
/* Menu bar */
|
|
|
|
|
|
|
|
.menu-bar {
|
|
|
|
--border-radius: 4px;
|
|
|
|
|
|
|
|
display: flex;
|
2024-08-27 20:43:14 +02:00
|
|
|
align-items: center;
|
2024-08-27 14:13:03 +02:00
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
width: fit-content;
|
|
|
|
height: 24px;
|
|
|
|
border-radius: var(--border-radius);
|
|
|
|
|
|
|
|
&>a {
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
color: var(--color-text);
|
|
|
|
padding: 4px 8px;
|
|
|
|
text-decoration: none;
|
|
|
|
|
2024-08-27 20:43:14 +02:00
|
|
|
line-height: 1;
|
|
|
|
|
2024-08-27 14:13:03 +02:00
|
|
|
&:hover {
|
|
|
|
background-color: var(--color-shaded-background);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.icon {
|
|
|
|
padding: 4px 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
border-top-left-radius: var(--border-radius);
|
|
|
|
border-bottom-left-radius: var(--border-radius);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
border-top-right-radius: var(--border-radius);
|
|
|
|
border-bottom-right-radius: var(--border-radius);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&>hr {
|
|
|
|
height: 100%;
|
|
|
|
margin: 0;
|
|
|
|
border: none;
|
|
|
|
border-right: 1px solid var(--color-panel-border);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|