From 8038ec7b6ba27898118e581f9d2812b16c0cd772 Mon Sep 17 00:00:00 2001 From: happytomatoe <2893931+happytomatoe@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:28:18 +0200 Subject: [PATCH 1/5] Improve test diff colors --- web/src/shell/editor.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/shell/editor.scss b/web/src/shell/editor.scss index ccb0f3845..e1a842158 100644 --- a/web/src/shell/editor.scss +++ b/web/src/shell/editor.scss @@ -19,19 +19,19 @@ } .diff-highlight-line-1 { - background-color: #ffebe9; + background-color: #390504; } .diff-highlight-cell-1 { - background-color: #ffc1c0; + background-color: #842019; } .diff-highlight-line-2 { - background-color: #dafbe1; + background-color: #0d2705; } .diff-highlight-cell-2 { - background-color: #aceebb; + background-color: #285d17; } textarea { From 8dd0292fe00f4d48a4f1c43e9a7e5158c1e5fa36 Mon Sep 17 00:00:00 2001 From: happytomatoe <2893931+happytomatoe@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:08:49 +0200 Subject: [PATCH 2/5] WIP --- web/src/pico/pico.scss | 11 +++++++++++ web/src/shell/editor.scss | 16 ++++++++-------- web/src/shell/test_panel.tsx | 8 ++++---- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/web/src/pico/pico.scss b/web/src/pico/pico.scss index 816508c63..57f430e51 100644 --- a/web/src/pico/pico.scss +++ b/web/src/pico/pico.scss @@ -33,6 +33,11 @@ --light-grey: rgb(170, 170, 170); --disabled: var(--light-grey); --file-picker-width: 400px; + //test diff colors + --diff-highlight-error-line-bg-color: #ffebe9; + --diff-highlight-error-cell-bg-color: #ffc1c0; + --diff-highlight-correct-line-bg-color: #dafbe1; + --diff-highlight-correct-cell-bg-color: #aceebb; } @media only screen and (prefers-color-scheme: dark) { @@ -40,6 +45,7 @@ --card-border-color: white; --text-color: white; --mark-background-color: rgb(30, 74, 109); + } } @@ -53,6 +59,11 @@ } --disabled: rgb(76, 85, 93); + //test diff colors + --diff-highlight-error-line-bg-color: #390504; + --diff-highlight-error-cell-bg-color: #842019; + --diff-highlight-correct-line-bg-color: #0d2705; + --diff-highlight-correct-cell-bg-color: #285d17; } } diff --git a/web/src/shell/editor.scss b/web/src/shell/editor.scss index e1a842158..52b002c6d 100644 --- a/web/src/shell/editor.scss +++ b/web/src/shell/editor.scss @@ -18,20 +18,20 @@ background-color: var(--mark-error-color); } - .diff-highlight-line-1 { - background-color: #390504; + .diff-highlight-error-line { + background-color: var(--diff-highlight-error-line-bg-color); } - .diff-highlight-cell-1 { - background-color: #842019; + .diff-highlight-error-cell { + background-color: var(--diff-highlight-error-cell-bg-color); } - .diff-highlight-line-2 { - background-color: #0d2705; + .diff-highlight-correct-line { + background-color: var(--diff-highlight-correct-line-bg-color); } - .diff-highlight-cell-2 { - background-color: #285d17; + .diff-highlight-correct-cell { + background-color: var(--diff-highlight-correct-cell-bg-color); } textarea { diff --git a/web/src/shell/test_panel.tsx b/web/src/shell/test_panel.tsx index 1fea579d9..016a3bff9 100644 --- a/web/src/shell/test_panel.tsx +++ b/web/src/shell/test_panel.tsx @@ -312,13 +312,13 @@ export const TestPanel = ({ function decorationTypeToCss(type: DecorationType) { switch (type) { case "error-line": - return "diff-highlight-line-1"; + return "diff-highlight-error-line"; case "error-cell": - return "diff-highlight-cell-1"; + return "diff-highlight-error-cell"; case "correct-line": - return "diff-highlight-line-2"; + return "diff-highlight-correct-line"; case "correct-cell": - return "diff-highlight-cell-2"; + return "diff-highlight-correct-cell"; default: return ""; } From 7e50bda983be6e6281ce6a0af77d8dc2e5817382 Mon Sep 17 00:00:00 2001 From: happytomatoe <2893931+happytomatoe@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:30:17 +0200 Subject: [PATCH 3/5] WIP --- web/src/pico/pico.scss | 10 ---------- web/src/shell/editor.scss | 13 +++++++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/web/src/pico/pico.scss b/web/src/pico/pico.scss index 57f430e51..98d2d138e 100644 --- a/web/src/pico/pico.scss +++ b/web/src/pico/pico.scss @@ -33,11 +33,6 @@ --light-grey: rgb(170, 170, 170); --disabled: var(--light-grey); --file-picker-width: 400px; - //test diff colors - --diff-highlight-error-line-bg-color: #ffebe9; - --diff-highlight-error-cell-bg-color: #ffc1c0; - --diff-highlight-correct-line-bg-color: #dafbe1; - --diff-highlight-correct-cell-bg-color: #aceebb; } @media only screen and (prefers-color-scheme: dark) { @@ -59,11 +54,6 @@ } --disabled: rgb(76, 85, 93); - //test diff colors - --diff-highlight-error-line-bg-color: #390504; - --diff-highlight-error-cell-bg-color: #842019; - --diff-highlight-correct-line-bg-color: #0d2705; - --diff-highlight-correct-cell-bg-color: #285d17; } } diff --git a/web/src/shell/editor.scss b/web/src/shell/editor.scss index 52b002c6d..762d1a071 100644 --- a/web/src/shell/editor.scss +++ b/web/src/shell/editor.scss @@ -1,3 +1,16 @@ +:root[data-theme="light"] { + --diff-highlight-error-line-bg-color: #ffebe9; + --diff-highlight-error-cell-bg-color: #ffc1c0; + --diff-highlight-correct-line-bg-color: #dafbe1; + --diff-highlight-correct-cell-bg-color: #aceebb; +} +:root[data-theme="dark"] { + --diff-highlight-error-line-bg-color: #390504; + --diff-highlight-error-cell-bg-color: #842019; + --diff-highlight-correct-line-bg-color: #0d2705; + --diff-highlight-correct-cell-bg-color: #285d17; +} + .Editor { width: 100%; From 34571d7a77346063c6e33cef8d4cc00f3e18b398 Mon Sep 17 00:00:00 2001 From: happytomatoe <2893931+happytomatoe@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:30:58 +0200 Subject: [PATCH 4/5] WIP --- web/src/pico/pico.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/web/src/pico/pico.scss b/web/src/pico/pico.scss index 98d2d138e..816508c63 100644 --- a/web/src/pico/pico.scss +++ b/web/src/pico/pico.scss @@ -40,7 +40,6 @@ --card-border-color: white; --text-color: white; --mark-background-color: rgb(30, 74, 109); - } } From 3d9b10a2800f5027901d6e359cc8804f77aca0cd Mon Sep 17 00:00:00 2001 From: David Souther Date: Tue, 20 Aug 2024 22:55:01 -0400 Subject: [PATCH 5/5] Prettier --- web/src/shell/editor.scss | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/web/src/shell/editor.scss b/web/src/shell/editor.scss index 762d1a071..a49420980 100644 --- a/web/src/shell/editor.scss +++ b/web/src/shell/editor.scss @@ -1,14 +1,14 @@ :root[data-theme="light"] { - --diff-highlight-error-line-bg-color: #ffebe9; - --diff-highlight-error-cell-bg-color: #ffc1c0; - --diff-highlight-correct-line-bg-color: #dafbe1; - --diff-highlight-correct-cell-bg-color: #aceebb; + --diff-highlight-error-line-bg-color: #ffebe9; + --diff-highlight-error-cell-bg-color: #ffc1c0; + --diff-highlight-correct-line-bg-color: #dafbe1; + --diff-highlight-correct-cell-bg-color: #aceebb; } :root[data-theme="dark"] { - --diff-highlight-error-line-bg-color: #390504; - --diff-highlight-error-cell-bg-color: #842019; - --diff-highlight-correct-line-bg-color: #0d2705; - --diff-highlight-correct-cell-bg-color: #285d17; + --diff-highlight-error-line-bg-color: #390504; + --diff-highlight-error-cell-bg-color: #842019; + --diff-highlight-correct-line-bg-color: #0d2705; + --diff-highlight-correct-cell-bg-color: #285d17; } .Editor { @@ -40,7 +40,7 @@ } .diff-highlight-correct-line { - background-color: var(--diff-highlight-correct-line-bg-color); + background-color: var(--diff-highlight-correct-line-bg-color); } .diff-highlight-correct-cell {