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-09-03 22:56:53 +02:00
|
|
|
|
|
|
|
font-size: 14px;
|
2024-08-27 14:23:53 +02:00
|
|
|
}
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
main {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: relative;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .fullscreen {
|
2024-08-24 20:09:52 +02:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2024-09-03 22:39:38 +02:00
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
2024-08-24 20:09:52 +02:00
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .panels {
|
2024-09-02 22:37:50 +02:00
|
|
|
--right-width: 384px; /* Overridden by JavaScript */
|
2024-10-25 21:38:18 +02:00
|
|
|
|
2024-08-25 14:36:45 +02:00
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 16px;
|
|
|
|
|
|
|
|
display: grid;
|
2024-10-25 21:38:18 +02:00
|
|
|
grid-template-columns: [left] 1fr [right-resize] auto [right] minmax(
|
|
|
|
0,
|
|
|
|
var(--right-width)
|
|
|
|
);
|
2024-08-25 14:36:45 +02:00
|
|
|
|
|
|
|
/* Pass all events through. Children may receive events as normal. */
|
|
|
|
pointer-events: none;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > * {
|
2024-08-25 14:36:45 +02:00
|
|
|
pointer-events: all;
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .right {
|
2024-08-25 14:36:45 +02:00
|
|
|
grid-column: right / right;
|
2024-09-03 22:39:38 +02:00
|
|
|
min-height: 0;
|
2024-09-02 22:37:50 +02:00
|
|
|
|
2024-09-08 12:09:14 +02:00
|
|
|
display: grid;
|
|
|
|
grid-template-rows: minmax(0, min-content);
|
|
|
|
grid-template-columns: [floating] max-content [resize] min-content [docked] auto;
|
|
|
|
|
|
|
|
padding-left: 16px;
|
|
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > * {
|
2024-09-08 12:09:14 +02:00
|
|
|
min-width: 0;
|
|
|
|
min-height: 0;
|
|
|
|
}
|
2024-09-02 22:37:50 +02:00
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > rkgk-resize-handle {
|
2024-09-08 12:09:14 +02:00
|
|
|
pointer-events: auto;
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .docked > rkgk-brush-editor {
|
2024-09-08 12:09:14 +02:00
|
|
|
max-height: 100%;
|
|
|
|
pointer-events: auto;
|
2024-09-03 22:42:00 +02:00
|
|
|
}
|
2024-09-02 22:37:50 +02:00
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .floating {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
|
|
& > rkgk-brush-preview {
|
|
|
|
width: 128px;
|
|
|
|
height: 128px;
|
|
|
|
pointer-events: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
& > rkgk-brush-cost-gauges {
|
|
|
|
width: 100%;
|
|
|
|
pointer-events: auto;
|
|
|
|
}
|
2024-09-02 22:37:50 +02:00
|
|
|
}
|
2024-08-25 14:36:45 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > rkgk-canvas-renderer {
|
2024-08-10 23:13:20 +02:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > rkgk-reticle-renderer {
|
2024-08-10 23:13:20 +02:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > #js-loading {
|
2024-08-24 20:09:52 +02:00
|
|
|
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;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .visual {
|
2024-09-02 22:37:50 +02:00
|
|
|
width: 2px;
|
|
|
|
height: 100%;
|
|
|
|
background-color: var(--color-brand-blue);
|
|
|
|
margin: 0 auto;
|
|
|
|
opacity: 0%;
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
&:hover > .visual,
|
|
|
|
&.dragging > .visual {
|
2024-09-02 22:37:50 +02:00
|
|
|
opacity: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-10 23:13:20 +02:00
|
|
|
|
|
|
|
/* Canvas renderer */
|
|
|
|
|
|
|
|
rkgk-canvas-renderer {
|
|
|
|
display: block;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > canvas {
|
2024-08-10 23:13:20 +02:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Reticle renderer */
|
|
|
|
|
|
|
|
rkgk-reticle-renderer {
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .reticles {
|
2024-08-10 23:13:20 +02:00
|
|
|
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;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .container {
|
|
|
|
& > .arrow {
|
2024-08-10 23:13:20 +02:00
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
background-color: var(--color);
|
|
|
|
clip-path: path("M 0,0 L 13,13 L 6,13 L 0,19 Z");
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .nickname {
|
2024-08-10 23:13:20 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-05 21:30:07 +02:00
|
|
|
/* Code editor */
|
|
|
|
|
|
|
|
rkgk-code-editor {
|
2024-09-05 22:13:07 +02:00
|
|
|
--gutter-width: 2.75em;
|
2024-09-05 22:05:15 +02:00
|
|
|
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
|
2024-09-08 12:09:14 +02:00
|
|
|
overflow: auto;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .layer {
|
2024-09-05 22:05:15 +02:00
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .line {
|
2024-09-05 22:13:07 +02:00
|
|
|
flex-shrink: 0;
|
2024-09-05 22:05:15 +02:00
|
|
|
white-space: pre-wrap;
|
2024-09-06 22:50:25 +02:00
|
|
|
|
|
|
|
min-height: var(--line-height-em);
|
2024-09-05 22:05:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .layer-gutter {
|
2024-09-05 22:05:15 +02:00
|
|
|
user-select: none;
|
|
|
|
|
|
|
|
counter-reset: line;
|
|
|
|
|
|
|
|
color: transparent;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .line {
|
2024-09-05 22:05:15 +02:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
|
|
counter-increment: line;
|
|
|
|
|
|
|
|
&::before {
|
2024-09-05 22:13:07 +02:00
|
|
|
flex-shrink: 0;
|
|
|
|
|
2024-09-05 22:05:15 +02:00
|
|
|
display: block;
|
|
|
|
width: var(--gutter-width);
|
2024-09-05 22:13:07 +02:00
|
|
|
padding-right: 0.75em;
|
2024-09-05 22:05:15 +02:00
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
content: counter(line);
|
|
|
|
text-align: right;
|
|
|
|
|
|
|
|
color: var(--color-text);
|
|
|
|
opacity: 40%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-09-06 22:50:25 +02:00
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .layer:not(.layer-gutter) {
|
2024-09-06 22:50:25 +02:00
|
|
|
margin-left: var(--gutter-width);
|
|
|
|
width: calc(100% - var(--gutter-width));
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .layer-error-squiggles {
|
2024-09-06 22:50:25 +02:00
|
|
|
color: transparent;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .line {
|
|
|
|
& > .squiggle {
|
2024-09-06 22:50:25 +02:00
|
|
|
text-decoration: underline wavy black;
|
|
|
|
text-decoration-skip-ink: none;
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .squiggle-error {
|
2024-09-06 22:50:25 +02:00
|
|
|
text-decoration-color: var(--color-error);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > textarea {
|
2024-09-05 21:30:07 +02:00
|
|
|
display: block;
|
2024-09-05 22:05:15 +02:00
|
|
|
width: calc(100% - var(--gutter-width));
|
2024-09-05 21:30:07 +02:00
|
|
|
margin: 0;
|
2024-09-05 22:05:15 +02:00
|
|
|
margin-left: var(--gutter-width);
|
|
|
|
padding: 0;
|
|
|
|
box-sizing: border-box;
|
|
|
|
overflow: hidden;
|
2024-09-05 21:30:07 +02:00
|
|
|
resize: none;
|
|
|
|
white-space: pre-wrap;
|
|
|
|
border: none;
|
2024-09-08 12:09:14 +02:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:has(textarea:focus) {
|
|
|
|
outline: 1px solid var(--color-brand-blue);
|
|
|
|
outline-offset: 4px;
|
2024-09-05 21:30:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
/* Brush editor */
|
|
|
|
|
2024-09-08 12:09:14 +02:00
|
|
|
rkgk-brush-editor.rkgk-panel {
|
2024-08-27 14:13:03 +02:00
|
|
|
padding: 12px;
|
2024-09-08 12:09:14 +02:00
|
|
|
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: 4px;
|
|
|
|
|
|
|
|
position: relative;
|
2024-10-25 21:38:18 +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
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .errors:empty,
|
|
|
|
& > .error-header:empty {
|
2024-08-19 23:56:11 +02:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .error-header {
|
2024-09-08 12:09:14 +02:00
|
|
|
margin: 0;
|
|
|
|
margin-top: 0.5em;
|
2024-08-19 23:56:11 +02:00
|
|
|
font-size: 1rem;
|
|
|
|
color: var(--color-error);
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > .errors {
|
2024-08-19 23:56:11 +02:00
|
|
|
margin: 0;
|
|
|
|
color: var(--color-error);
|
|
|
|
white-space: pre-wrap;
|
2024-08-10 23:13:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-08 12:09:14 +02:00
|
|
|
/* Brush preview */
|
|
|
|
|
|
|
|
rkgk-brush-preview {
|
|
|
|
--checkerboard-light: #f2f2f2;
|
|
|
|
--checkerboard-dark: #e1e1e1;
|
|
|
|
--checkerboard-size: 64px;
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
background: repeating-conic-gradient(
|
|
|
|
var(--checkerboard-light) 0% 25%,
|
|
|
|
var(--checkerboard-dark) 0% 50%
|
|
|
|
)
|
2024-09-08 12:09:14 +02:00
|
|
|
50% 50% / var(--checkerboard-size) var(--checkerboard-size);
|
|
|
|
border-radius: 4px;
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > canvas {
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
|
2024-09-08 12:09:14 +02:00
|
|
|
&.error {
|
2024-10-25 21:38:18 +02:00
|
|
|
& > canvas {
|
2024-09-08 12:09:14 +02:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: "(error)";
|
|
|
|
position: absolute;
|
|
|
|
left: 50%;
|
|
|
|
top: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
/* Brush cost gauges */
|
|
|
|
|
|
|
|
rkgk-brush-cost-gauges,
|
|
|
|
rkgk-brush-cost-gauges.rkgk-panel {
|
|
|
|
--gauge-size: 20px;
|
|
|
|
|
|
|
|
height: var(--gauge-size);
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
|
|
overflow: clip; /* clip corners */
|
|
|
|
|
|
|
|
& > rkgk-brush-cost-gauge {
|
|
|
|
display: block;
|
|
|
|
height: var(--gauge-size);
|
|
|
|
flex-grow: 1;
|
|
|
|
|
|
|
|
& > .full {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
clip-path: xywh(0 0 var(--progress) 100%);
|
|
|
|
|
|
|
|
background-color: var(--gauge-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.code-size {
|
|
|
|
--gauge-color: var(--color-brand-blue);
|
|
|
|
}
|
|
|
|
&.fuel {
|
|
|
|
--gauge-color: #f44096;
|
|
|
|
}
|
|
|
|
&.objects {
|
|
|
|
--gauge-color: #fd9916;
|
|
|
|
}
|
|
|
|
&.memory {
|
|
|
|
--gauge-color: #5aca40;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-10 23:13:20 +02:00
|
|
|
/* Welcome screen */
|
|
|
|
|
|
|
|
rkgk-welcome {
|
2024-10-25 21:38:18 +02:00
|
|
|
& > dialog {
|
2024-08-10 23:13:20 +02:00
|
|
|
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-10-25 21:38:18 +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
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > dialog[name="error-dialog"][open] {
|
|
|
|
& textarea[name="error-text"] {
|
2024-08-25 12:53:53 +02:00
|
|
|
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;
|
2024-10-25 21:38:18 +02:00
|
|
|
|
2024-08-27 14:13:03 +02:00
|
|
|
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);
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > a {
|
2024-08-27 14:13:03 +02:00
|
|
|
display: block;
|
2024-10-25 21:38:18 +02:00
|
|
|
|
2024-08-27 14:13:03 +02:00
|
|
|
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 {
|
2024-09-08 12:09:14 +02:00
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
2024-08-27 14:13:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&: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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-25 21:38:18 +02:00
|
|
|
& > hr {
|
2024-08-27 14:13:03 +02:00
|
|
|
height: 100%;
|
|
|
|
margin: 0;
|
|
|
|
border: none;
|
|
|
|
border-right: 1px solid var(--color-panel-border);
|
|
|
|
}
|
|
|
|
}
|