diff --git a/src/styles/global.css b/src/styles/global.css
index 2dfbc691..31749a64 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -10,7 +10,6 @@ body {
}
.container {
- background-color: #ffffff;
overflow-x: hidden;
}
@@ -20,8 +19,7 @@ body {
align-items: center;
padding: 10px;
height: 56px;
- border-bottom: 2px #ccc solid;
- color: #343a40
+ border-bottom: 2px solid;
}
.header-title {
@@ -45,36 +43,27 @@ body {
.nav-item {
display: flex;
align-items: center;
- fill: #343a40;
cursor: pointer;
margin: 0 16px;
user-select: none;
}
-.nav-item:hover {
- fill: #565d64;
-}
-
-.nav-item .inactive {
- display: none;
-}
-
.nav-item span {
font-size: 1.1em;
}
-.nav-item#github-link {
- fill: #9fa2a7
-}
-
-.nav-item#github-link:hover {
- fill: #bcbfc3
-}
-
.nav-item#source-toggle {
display: none;
}
+.toggle:not(.toggled) svg:nth-child(1) {
+ display: none;
+}
+
+.toggle.toggled svg:nth-child(2) {
+ display: none;
+}
+
.nav-selector {
position: relative;
}
@@ -89,7 +78,6 @@ body {
margin-top: 10px;
z-index: 10;
border-radius: 3px;
- background-color: #ffffff83;
}
.content {
@@ -118,10 +106,6 @@ body {
outline: none;
}
-.source textarea::selection {
- background-color: rgba(103, 134, 221, 0.6);
-}
-
.source-controls {
display: flex;
flex-direction: row-reverse;
@@ -146,7 +130,7 @@ body {
}
.gutter.gutter-horizontal {
- border-left: 2px solid #ccc;
+ border-left: 2px solid;
float: left;
cursor: ew-resize;
}
@@ -156,9 +140,6 @@ body {
align-items: center;
border: none;
border-radius: 3px;
- color: #ffffff;
- fill: #ffffff;
- background-color: #1f2020a6;
padding: 7px 11px;
cursor: pointer;
outline: none;
@@ -166,24 +147,10 @@ body {
transition: background-color 0.2s;
}
-.btn.check {
- fill: #a5e77a;
- color: #a5e77a;
-}
-
-.btn.selected {
- fill: #a5e77a;
- color: #a5e77a;
-}
-
.btn svg:not(:last-child) {
margin-right: 5px;
}
-.btn:hover {
- background-color: #5d5f5fa6;
-}
-
.btn-group .btn:not(:last-child) {
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
@@ -229,20 +196,19 @@ body {
left: 10px;
}
- .source.toggled {
+ .source.active {
display: initial;
position: absolute;
width: 100% !important;
height: 100%;
- z-index: 5;
}
- .source.toggled .source-controls {
+ .source.active .source-controls {
right: 17px;
top: 0px;
}
- .source.toggled .source-controls-menu {
+ .source.active .source-controls-menu {
right: 17px;
top: 37px;
}
@@ -252,3 +218,114 @@ body {
left: initial;
}
}
+
+/* COLORS */
+
+.container {
+ background-color: #ffffff;
+}
+
+.header,
+.nav-item {
+ fill: #343a40;
+ color: #343a40;
+}
+
+.nav-item:hover {
+ fill: #565d64;
+}
+
+.nav-item#github-link {
+ fill: #9fa2a7;
+}
+
+.nav-item#github-link:hover {
+ fill: #bcbfc3;
+}
+
+.source textarea::selection {
+ background-color: rgba(103, 134, 221, 0.6);
+}
+
+.gutter.gutter-horizontal,
+.header {
+ border-color: #cccccc;
+}
+
+.nav-selector-menu {
+ background-color: #ffffff83;
+}
+
+.btn {
+ background-color: #1f2020a6;
+ color: #ffffff;
+ fill: #ffffff;
+}
+
+.btn.check,
+.btn.selected {
+ fill: #a5e77a;
+ color: #a5e77a;
+}
+
+.btn:hover {
+ background-color: #5d5f5fa6;
+}
+
+/* DARK MODE */
+
+body[data-style=dark] .container,
+body[data-style=dark] textarea {
+ background-color: #222222;
+}
+
+body[data-style=dark] textarea {
+ color: #ffffff;
+}
+
+body[data-style=dark] .header-title,
+body[data-style=dark] .nav-item {
+ fill: #91908f;
+ color: #91908f;
+}
+
+body[data-style=dark] .nav-item:hover {
+ fill: #b4b3b0;
+}
+
+body[data-style=dark] .nav-item#github-link {
+ fill: #4d4c4c;
+}
+
+body[data-style=dark] .nav-item#github-link:hover {
+ fill: #6e6e6e;
+}
+
+body[data-style=dark] .source textarea::selection {
+ background-color: rgba(103, 134, 221, 0.6);
+}
+
+body[data-style=dark] .gutter.gutter-horizontal,
+body[data-style=dark] .header {
+ border-color: #3d3d3d;
+}
+
+body[data-style=dark] .nav-selector-menu {
+ background-color: #00000083;
+}
+
+body[data-style=dark] .btn {
+ background-color: #0a0a0aa6;
+ color: #ffffff;
+ fill: #ffffff;
+}
+
+body[data-style=dark] .btn.check,
+body[data-style=dark] .btn.selected {
+ fill: #a5e77a;
+ color: #a5e77a;
+}
+
+body[data-style=dark] .btn:hover {
+ background-color: #383838a6;
+}
diff --git a/src/styles/nodes.css b/src/styles/nodes.css
index a030afa8..8e6c4fa0 100644
--- a/src/styles/nodes.css
+++ b/src/styles/nodes.css
@@ -58,7 +58,7 @@
.node-header > label,
.node-header > button {
- padding: 0 3px;
+ padding: 0 5px;
}
.node-header > *:first-child {
@@ -124,17 +124,13 @@ button.remove::before {
background-color: #e4e4e4;
}
-.node-header > button.add {
- border-color: #54911b;
- background-color: #add38a;
-}
-
-.node-header > button.selected {
+button.selected {
background-color: #f0e65e;
border-color: #b9a327
}
-.node-header > label.collapse.closed {
+.node-header > label.collapse.closed,
+button.add {
border-color: #54911b;
background-color: #add38a;
}
@@ -156,3 +152,50 @@ button.remove {
.object-node > .node-body {
border-color: #b9b9b9;
}
+
+/* DARK MODE */
+
+body[data-style=dark] .node-header > * {
+ border-color: #4e4e4e;
+}
+
+body[data-style=dark] .node-header > label {
+ background-color: #1b1b1b;
+ color: #dadada;
+}
+
+body[data-style=dark] .node-header > input,
+body[data-style=dark] .node-header > select,
+body[data-style=dark] .node-header > button {
+ background-color: #272727;
+ color: #dadada;
+}
+
+body[data-style=dark] button.selected {
+ background-color: #726d28;
+ border-color: #867e0e
+}
+
+body[data-style=dark] .node-header > label.collapse.closed,
+body[data-style=dark] button.add {
+ border-color: #3b6e0c;
+ background-color: #688f40;
+}
+
+body[data-style=dark] .node-header > label.collapse.open,
+body[data-style=dark] button.remove {
+ border-color: #7e1d05;
+ background-color: #ad472d;
+}
+
+.list-node > .node-body {
+ border-color: #72a543;
+}
+
+body[data-style=dark] .map-node > .node-body {
+ border-color: #4d99cc;
+}
+
+body[data-style=dark] .object-node > .node-body {
+ border-color: #8a8a8a;
+}