refactor: webui add css color variables (#710)

* refactor: webui add css color variables

* refactor: removed redundant css

* fix: correct colors to match original

* fix: update bg-tertiary variable

---------

Co-authored-by: sigoden <sigoden@gmail.com>
This commit is contained in:
Cam F
2026-05-25 19:47:10 -05:00
committed by GitHub
parent 3ac409ca58
commit 5df9265de0
2 changed files with 59 additions and 60 deletions
+58 -59
View File
@@ -1,13 +1,35 @@
:root {
color-scheme: light;
--bg-primary: #fff;
--bg-secondary: #fafafa;
--bg-tertiary: #fff;
--bg-hover: #fafafa;
--text-primary: #24292e;
--text-secondary: #5c5c5c;
--text-tertiary: #586069;
--text-accent: #0366d6;
--svg-primary: #24292e;
--svg-secondary: rgba(3, 47, 98, 0.5);
--svg-tertiary: #24292e;
--border-primary: #ddd;
--border-secondary: #ced4da;
}
html {
font-family: -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
line-height: 1.5;
color: #24292e;
color: var(--text-primary);
}
body {
/* prevent premature breadcrumb wrapping on mobile */
min-width: 538px;
margin: 0;
background-color: var(--bg-primary);
}
svg {
fill: var(--svg-primary);
}
.hidden {
@@ -21,7 +43,7 @@ body {
padding: 0.6em 1em;
position: sticky;
top: 0;
background-color: white;
background-color: var(--bg-tertiary);
}
.breadcrumb {
@@ -31,7 +53,7 @@ body {
}
.breadcrumb>a {
color: #0366d6;
color: var(--text-accent);
text-decoration: none;
}
@@ -41,17 +63,17 @@ body {
/* final breadcrumb */
.breadcrumb>b {
color: #24292e;
color: var(--text-primary);
}
.breadcrumb>.separator {
color: #586069;
color: var(--text-tertiary);
padding: 0 0.25em;
}
.breadcrumb svg {
height: 100%;
fill: rgba(3, 47, 98, 0.5);
fill: var(--svg-secondary);
}
.toolbox {
@@ -83,9 +105,9 @@ body {
flex-wrap: nowrap;
width: 246px;
height: 22px;
background-color: #fafafa;
background-color: var(--bg-secondary);
transition: all .15s;
border: 1px #ddd solid;
border: 1px var(--border-primary) solid;
border-radius: 15px;
margin-bottom: 2px;
}
@@ -97,17 +119,22 @@ body {
font-size: 16px;
line-height: 16px;
padding: 1px;
color: var(--text-primary);
background-color: transparent;
border: none;
outline: none;
}
.searchbar .icon {
color: #9a9a9a;
color: var(--svg-tertiary);
padding: 3px 3px;
cursor: pointer;
}
.searchbar svg {
fill: var(--svg-tertiary);
}
.main {
padding: 0 1em;
}
@@ -120,7 +147,7 @@ body {
.paths-table th {
text-align: left;
font-weight: unset;
color: #5c5c5c;
color: var(--text-secondary);
white-space: nowrap;
}
@@ -148,7 +175,7 @@ body {
}
.paths-table tbody tr:hover {
background-color: #fafafa;
background-color: var(--bg-hover);
}
.paths-table .cell-actions {
@@ -172,7 +199,7 @@ body {
.path svg {
height: 16px;
fill: rgba(3, 47, 98, 0.5);
fill: var(--svg-secondary);
padding-right: 0.5em;
vertical-align: text-top;
}
@@ -182,7 +209,7 @@ body {
}
.path a {
color: #0366d6;
color: var(--text-accent);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
@@ -212,7 +239,9 @@ body {
.editor {
width: 100%;
height: calc(100vh - 5rem);
border: 1px solid #ced4da;
border: 1px solid var(--border-secondary);
background: var(--bg-primary);
color: var(--text-primary);
outline: none;
padding: 5px;
}
@@ -258,50 +287,20 @@ body {
/* dark theme */
@media (prefers-color-scheme: dark) {
body {
background-color: #000;
}
html,
.breadcrumb>b,
.searchbar #search {
color: #fff;
}
.uploaders-table th,
.paths-table th {
color: #ddd;
}
svg,
.path svg,
.breadcrumb svg {
fill: #fff;
}
.head {
background-color: #111;
}
.searchbar {
background-color: #111;
border-color: #fff6;
}
.searchbar svg {
fill: #fff6;
}
.path a {
color: #3191ff;
}
.paths-table tbody tr:hover {
background-color: #1a1a1a;
}
.editor {
background: black;
color: white;
:root {
color-scheme: dark;
--bg-primary: #000;
--bg-secondary: #111;
--bg-tertiary: #111;
--bg-hover: #1a1a1a;
--text-primary: #fff;
--text-secondary: #ddd;
--text-tertiary: #586069; /*Unchanged in both color schemes*/
--text-accent: #3191ff;
--svg-primary: #fff;
--svg-secondary: #fff;
--svg-tertiary: #fff6;
--border-primary: #fff6;
--border-secondary: #ced4da; /*Unchanged in both color schemes*/
}
}
+1 -1
View File
@@ -97,7 +97,7 @@
<svg viewBox="0 0 1024 1024" width="24" height="24">
<path
d="M426.666667 682.666667v42.666666h170.666666v-42.666666h-170.666666z m-42.666667-85.333334h298.666667v128h42.666666V418.133333L605.866667 298.666667H298.666667v426.666666h42.666666v-128h42.666667z m260.266667-384L810.666667 379.733333V810.666667H213.333333V213.333333h430.933334zM341.333333 341.333333h85.333334v170.666667H341.333333V341.333333z"
fill="#444444" p-id="8311"></path>
p-id="8311"></path>
</svg>
</div>
</div>