display refactoring
This commit is contained in:
+154
-46
@@ -1,5 +1,3 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');
|
||||
|
||||
:root {
|
||||
--bg: #201f1c;
|
||||
--panel: #29271f;
|
||||
@@ -18,14 +16,19 @@
|
||||
--display: 'Space Grotesk', ui-sans-serif, sans-serif;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html, body, #root {
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
background: var(--bg);
|
||||
color: var(--ink);
|
||||
font-family: var(--mono);
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#app {
|
||||
@@ -49,7 +52,7 @@ html, body, #root {
|
||||
.topbar__title {
|
||||
font-family: var(--display);
|
||||
font-weight: 700;
|
||||
font-size: 15px;
|
||||
font-size: 150%;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink);
|
||||
@@ -62,7 +65,6 @@ html, body, #root {
|
||||
display: block;
|
||||
font-family: var(--mono);
|
||||
font-weight: 400;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--ink-dim);
|
||||
text-transform: none;
|
||||
@@ -71,23 +73,23 @@ html, body, #root {
|
||||
|
||||
.tick-counter {
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
color: var(--ink-dim);
|
||||
background: var(--panel-2);
|
||||
border: 1px solid var(--line);
|
||||
padding: 6px 12px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.tick-counter b {
|
||||
color: var(--accent-converter);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.spacer { flex: 1; }
|
||||
.spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.03em;
|
||||
border: 1px solid var(--line);
|
||||
@@ -98,9 +100,19 @@ html, body, #root {
|
||||
cursor: pointer;
|
||||
transition: border-color 0.12s, transform 0.05s;
|
||||
}
|
||||
.btn:hover { border-color: var(--ink-dim); }
|
||||
.btn:active { transform: translateY(1px); }
|
||||
.btn:focus-visible { outline: 2px solid var(--accent-converter); outline-offset: 2px; }
|
||||
|
||||
.btn:hover {
|
||||
border-color: var(--ink-dim);
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
.btn:focus-visible {
|
||||
outline: 2px solid var(--accent-converter);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.btn--primary {
|
||||
background: var(--accent-converter);
|
||||
@@ -108,7 +120,10 @@ html, body, #root {
|
||||
color: #201f1c;
|
||||
font-weight: 600;
|
||||
}
|
||||
.btn--primary:hover { border-color: #f0c169; }
|
||||
|
||||
.btn--primary:hover {
|
||||
border-color: #f0c169;
|
||||
}
|
||||
|
||||
.btn--danger {
|
||||
background: transparent;
|
||||
@@ -117,7 +132,10 @@ html, body, #root {
|
||||
margin-top: 14px;
|
||||
width: 100%;
|
||||
}
|
||||
.btn--danger:hover { background: rgba(193, 90, 78, 0.12); }
|
||||
|
||||
.btn--danger:hover {
|
||||
background: rgba(193, 90, 78, 0.12);
|
||||
}
|
||||
|
||||
.btn--ghost {
|
||||
background: transparent;
|
||||
@@ -129,12 +147,10 @@ html, body, #root {
|
||||
|
||||
.btn--icon {
|
||||
padding: 4px 8px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
select {
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
background: var(--panel-2);
|
||||
color: var(--ink);
|
||||
border: 1px solid var(--line);
|
||||
@@ -169,14 +185,18 @@ select {
|
||||
height: 900px;
|
||||
}
|
||||
|
||||
#world > svg {
|
||||
#world>svg {
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 1600px;
|
||||
height: 900px;
|
||||
pointer-events: none;
|
||||
}
|
||||
#world > svg line { pointer-events: stroke; }
|
||||
|
||||
#world>svg line {
|
||||
pointer-events: stroke;
|
||||
}
|
||||
|
||||
.node {
|
||||
position: absolute;
|
||||
@@ -184,28 +204,45 @@ select {
|
||||
border: 1px solid var(--line);
|
||||
border-left: 4px solid var(--accent-storage);
|
||||
border-radius: 4px;
|
||||
padding: 8px 10px;
|
||||
padding: 0.25em 0.5em;
|
||||
cursor: grab;
|
||||
user-select: none;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.35);
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
|
||||
touch-action: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25em;
|
||||
}
|
||||
.node:active { cursor: grabbing; }
|
||||
|
||||
.node:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.node.is-selected {
|
||||
border-left-width: 4px;
|
||||
outline: 1.5px dashed var(--ink);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.node--source { border-left-color: var(--accent-source); }
|
||||
.node--storage { border-left-color: var(--accent-storage); }
|
||||
.node--converter { border-left-color: var(--accent-converter); }
|
||||
.node--consumer { border-left-color: var(--accent-consumer); }
|
||||
.node--source {
|
||||
border-left-color: var(--accent-source);
|
||||
}
|
||||
|
||||
.node--storage {
|
||||
border-left-color: var(--accent-storage);
|
||||
}
|
||||
|
||||
.node--converter {
|
||||
border-left-color: var(--accent-converter);
|
||||
}
|
||||
|
||||
.node--consumer {
|
||||
border-left-color: var(--accent-consumer);
|
||||
}
|
||||
|
||||
.unit__id {
|
||||
font-family: var(--display);
|
||||
font-weight: 200;
|
||||
font-size: 10px;
|
||||
color: var(--ink);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -215,7 +252,7 @@ select {
|
||||
.unit__title {
|
||||
font-family: var(--display);
|
||||
font-weight: 600;
|
||||
font-size: 12.5px;
|
||||
font-size: 125%;
|
||||
color: var(--ink);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -223,15 +260,12 @@ select {
|
||||
}
|
||||
|
||||
.unit__kind {
|
||||
font-size: 9px;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-dim);
|
||||
margin: 2px 0 6px;
|
||||
}
|
||||
|
||||
.unit__resources {
|
||||
font-size: 11px;
|
||||
background: #171613;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 3px;
|
||||
@@ -241,7 +275,6 @@ select {
|
||||
}
|
||||
|
||||
.unit__links {
|
||||
font-size: 11px;
|
||||
background: #171613;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 3px;
|
||||
@@ -250,6 +283,37 @@ select {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.unit__converter__progress {
|
||||
font-size: 75%;
|
||||
background: #171613;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 3px;
|
||||
padding: 1px 6px;
|
||||
letter-spacing: 0.02em;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-height: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.unit__converter__progress_bar {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
background: linear-gradient(90deg, var(--accent-converter), #f0c169);
|
||||
opacity: 0.3;
|
||||
transition: width 0.15s ease-out;
|
||||
}
|
||||
|
||||
.unit__converter__progress_info {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.unit__sockets {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -260,8 +324,14 @@ select {
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
}
|
||||
.unit__sockets--input { left: -5px; }
|
||||
.unit__sockets--output { right: -5px; }
|
||||
|
||||
.unit__sockets--input {
|
||||
left: -5px;
|
||||
}
|
||||
|
||||
.unit__sockets--output {
|
||||
right: -5px;
|
||||
}
|
||||
|
||||
.unit__socket {
|
||||
width: 10px;
|
||||
@@ -287,6 +357,7 @@ select {
|
||||
padding: 14px 16px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.sidebar__section--grow {
|
||||
flex: 1;
|
||||
border-bottom: none;
|
||||
@@ -308,6 +379,7 @@ select {
|
||||
max-height: 140px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sidebar__list li {
|
||||
padding: 6px 8px;
|
||||
font-size: 11.5px;
|
||||
@@ -318,8 +390,16 @@ select {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.sidebar__list li:hover { background: var(--panel-2); color: var(--ink); }
|
||||
.sidebar__list li.is-active { background: var(--panel-2); color: var(--accent-converter); }
|
||||
|
||||
.sidebar__list li:hover {
|
||||
background: var(--panel-2);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.sidebar__list li.is-active {
|
||||
background: var(--panel-2);
|
||||
color: var(--accent-converter);
|
||||
}
|
||||
|
||||
#sidebar-content {
|
||||
padding: 16px 0 0;
|
||||
@@ -349,7 +429,9 @@ select {
|
||||
font-size: 11px;
|
||||
color: var(--ink-dim);
|
||||
}
|
||||
.field input, .field select {
|
||||
|
||||
.field input,
|
||||
.field select {
|
||||
font-family: var(--mono);
|
||||
font-size: 12px;
|
||||
background: var(--panel-2);
|
||||
@@ -359,13 +441,21 @@ select {
|
||||
padding: 7px 9px;
|
||||
width: 100%;
|
||||
}
|
||||
.field input:focus-visible, .field select:focus-visible {
|
||||
|
||||
.field input:focus-visible,
|
||||
.field select:focus-visible {
|
||||
outline: 2px solid var(--accent-converter);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.coord-row { display: flex; gap: 8px; }
|
||||
.coord-row input { width: 50%; }
|
||||
.coord-row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.coord-row input {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.recipe-box {
|
||||
border: 1px solid var(--line);
|
||||
@@ -374,6 +464,7 @@ select {
|
||||
margin-bottom: 12px;
|
||||
background: var(--panel-2);
|
||||
}
|
||||
|
||||
.recipe-box__title {
|
||||
font-size: 10.5px;
|
||||
text-transform: uppercase;
|
||||
@@ -381,15 +472,32 @@ select {
|
||||
color: var(--ink-dim);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.recipe-row {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
margin-bottom: 6px;
|
||||
align-items: center;
|
||||
}
|
||||
.recipe-row select { flex: 1.4; }
|
||||
.recipe-row input { flex: 1; }
|
||||
|
||||
::-webkit-scrollbar { width: 9px; height: 9px; }
|
||||
::-webkit-scrollbar-track { background: var(--bg); }
|
||||
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
|
||||
.recipe-row select {
|
||||
flex: 1.4;
|
||||
}
|
||||
|
||||
.recipe-row input {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--line);
|
||||
border-radius: 5px;
|
||||
}
|
||||
Reference in New Issue
Block a user