Lines css vars (#328)

* css variables for sidebar

* type

* line css vars

* lines css vars
This commit is contained in:
Red J Adaya 2024-02-25 04:46:04 +08:00 committed by GitHub
parent 1eb89e1982
commit 1965493054
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 58 additions and 32 deletions

View File

@ -82,6 +82,14 @@
@main-content-bottom-background: #333; @main-content-bottom-background: #333;
:root { :root {
--app-accent-color: rgb(88, 193, 66);
--app-error-color: rgb(204, 0, 0);
--app-warning-color: rgb(255, 165, 0);
--app-scrollbar-thumb-color: rgb(134, 134, 134);
--app-text-color: rgb(236, 238, 236);
--app-border-color: #333;
--primary-text-color: #eceeec; --primary-text-color: #eceeec;
--primary-border-color: #333; --primary-border-color: #333;
@ -91,4 +99,21 @@
--sidebar-workspace-active-color: rgba(241, 246, 243, 0.08); --sidebar-workspace-active-color: rgba(241, 246, 243, 0.08);
--sidebar-separator-color: rgba(241, 246, 243, 0.08); --sidebar-separator-color: rgba(241, 246, 243, 0.08);
--sidebar-settings-color: #ffffff; --sidebar-settings-color: #ffffff;
--line-text-color: #d3d7cf;
--line-selected-bg-color: rgba(255, 255, 255, 0.1);
--line-active-border-color: rgba(88, 193, 66, 0.8);
--line-selected-border-left-color: #ccc;
--line-selected-error-border-color: rgba(204, 0, 0, 0.8);
--line-selected-error-bg-color: rgb(19, 4, 3);
--line-error-bg-color: rgba(200, 0, 0, 0.1);
--line-error-border-left-color: --line-selected-error-border-color;
--line-simple-text-color: rgba(236, 238, 236, 0.6);
--line-meta-text-color: rgb(139, 145, 138);
--line-meta-user-color: rgba(140, 184, 232);
--line-svg-color: rgba(236, 238, 236, 0.6);
--line-svg-hover-color: rgba(236, 238, 236, 1);
--line-sidebar-message-color: rgb(196, 160, 0);
--term-error-color: rgb(204, 0, 0);
} }

View File

@ -30,33 +30,33 @@
} }
&.line-invalid { &.line-invalid {
color: @term-white; color: var(--line-text-color);
margin-left: 5px; margin-left: 5px;
} }
&.selected { &.selected {
.line-mask { .line-mask {
border-left: 4px solid #ccc; border-left: 4px solid var(--line-selected-border-left-color);
} }
&.has-error { &.has-error {
.line-mask { .line-mask {
border-left: 4px solid rgba(@error-red-brightened, 0.8); border-left: 4px solid var(--line-selected-error-border-color);
} }
} }
} }
&.active.selected { &.active.selected {
.line-mask { .line-mask {
background-color: rgba(255, 255, 255, 0.1); background-color: var(--line-selected-bg-color);
border: 2px solid rgba(@wave-green, 0.8); border: 2px solid var(--line-active-border-color);
border-left: 4px solid rgba(@wave-green, 0.8); border-left: 4px solid var(--line-active-border-color);
} }
&.has-error { &.has-error {
.line-mask { .line-mask {
border: 2px solid rgba(@error-red, 0.8); border: 2px solid var(--line-selected-error-border-color);
border-left: 4px solid rgba(@error-red, 0.8); border-left: 4px solid var(--line-selected-error-border-color);
} }
} }
} }
@ -72,13 +72,13 @@
pointer-events: none; pointer-events: none;
&.error-mask { &.error-mask {
background-color: rgba(200, 0, 0, 0.1); background-color: var(--line-error-bg-color);
border-left: 4px solid rgba(@error-red, 0.8); border-left: 4px solid var(--line-error-border-left-color);
} }
} }
.load-error-text { .load-error-text {
color: @term-red; color: var(--term-error-color);
padding-top: 5px; padding-top: 5px;
} }
@ -87,7 +87,7 @@
} }
.sidebar-message { .sidebar-message {
color: @term-yellow; color: var(--line-sidebar-message-color);
} }
.focus-indicator { .focus-indicator {
@ -98,7 +98,7 @@
&.line-simple { &.line-simple {
font-size: 11px; font-size: 11px;
line-height: 1.2; line-height: 1.2;
color: rgba(@base-color, 0.6); color: var(--line-simple-text-color);
.simple-line-header { .simple-line-header {
display: flex; display: flex;
@ -122,22 +122,22 @@
margin-left: 0.5em; margin-left: 0.5em;
margin-right: 0.5em; margin-right: 0.5em;
vertical-align: text-top; vertical-align: text-top;
fill: @base-color; fill: var(--app-text-color);
} }
.success { .success {
color: @wave-green; color: var(--app-accent-color);
fill: @wave-green; fill: var(--app-accent-color);
} }
.fail { .fail {
color: @error-red; color: var(--app-error-color);
fill: @error-red; fill: var(--app-error-color);
} }
.warning { .warning {
color: @warning-yellow; color: var(--app-warning-color);
fill: @warning-yellow; fill: var(--app-warning-color);
} }
} }
@ -195,7 +195,7 @@
} }
.meta.meta-line1 { .meta.meta-line1 {
color: @text-caption; color: var(--line-meta-text-color);
} }
.meta.meta-line2 { .meta.meta-line2 {
@ -220,7 +220,8 @@
flex-direction: row; flex-direction: row;
.user { .user {
color: lighten(@soft-blue, 10%); // color: lighten(@soft-blue, 10%);
color: var(--line-meta-user-color);
font-weight: bold; font-weight: bold;
margin-top: 1px; margin-top: 1px;
margin-right: 10px; margin-right: 10px;
@ -237,7 +238,7 @@
svg { svg {
width: 1em; width: 1em;
margin-right: 0.5em; margin-right: 0.5em;
fill: rgba(@base-color, 0.6); fill: var(--line-svg-color);
} }
} }
@ -250,9 +251,9 @@
border-radius: 50%; border-radius: 50%;
line-height: 1em; line-height: 1em;
svg { svg {
fill: rgba(@base-color, 0.6); fill: var(--line-svg-color);
&:hover { &:hover {
fill: @base-color; fill: var(--line-svg-hover-color);
} }
} }
} }
@ -279,7 +280,7 @@
.cmdtext-overflow { .cmdtext-overflow {
flex-shrink: 0; flex-shrink: 0;
padding-right: 2px; padding-right: 2px;
color: @term-white; color: var(--line-text-color);
cursor: pointer; cursor: pointer;
} }
} }
@ -294,7 +295,7 @@
.cmdtext-expanded { .cmdtext-expanded {
white-space: pre; white-space: pre;
color: @term-white; color: var(--line-text-color);
padding-bottom: 5px; padding-bottom: 5px;
} }
} }
@ -358,13 +359,13 @@
padding: 2px 5px 0px 5px; padding: 2px 5px 0px 5px;
display: inline-block; display: inline-block;
font-size: 10px; font-size: 10px;
color: @term-white; color: var(--line-text-color);
background-color: #151715; background-color: #151715;
} }
.cmd-rtnstate-diff { .cmd-rtnstate-diff {
font-family: var(--termfontfamily); font-family: var(--termfontfamily);
color: @term-white; color: var(--line-text-color);
white-space: pre; white-space: pre;
margin-left: 10px; margin-left: 10px;
padding-left: 10px; padding-left: 10px;

View File

@ -20,7 +20,7 @@
&:focus, &:focus,
&:focus-within { &:focus-within {
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
background-color: @scrollbar-thumb !important; background-color: var(--app-scrollbar-thumb-color) !important;
} }
} }
@ -35,7 +35,7 @@
.line-sep-labeled { .line-sep-labeled {
display: flex; display: flex;
align-items: center; align-items: center;
color: @text-caption; color: var(--line-meta-text-color);
font-family: var(--termfontfamily); font-family: var(--termfontfamily);
line-height: var(--termlineheight); line-height: var(--termlineheight);
font-size: var(--termfontsize); font-size: var(--termfontsize);
@ -60,6 +60,6 @@
.line-sep { .line-sep {
width: 100%; width: 100%;
height: 1px; height: 1px;
border-bottom: 1px solid @thin-border-color; border-bottom: 1px solid var(--app-border-color);
} }
} }