Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit eed2527

Browse files
myan9starpit
authored andcommitted
fix: monaco diff view colors are not themed
Fixes #6232
1 parent 04f3ca4 commit eed2527

File tree

19 files changed

+128
-1
lines changed

19 files changed

+128
-1
lines changed

plugins/plugin-carbon-themes/web/scss/colors.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
--color-base0E: #fa75a6;
3737
--color-base0F: #d4bbff;
3838

39+
--color-base0B-rgb: 36, 161, 72;
40+
--color-base08-rgb: 255, 131, 137;
41+
42+
--color-green-rgb: var(--color-base0B-rgb);
43+
--color-red-rgb: var(--color-base08-rgb);
44+
3945
--color-confirm-background: var(--color-sidecar-header);
4046
--color-confirm-foreground: var(--color-base06);
4147

@@ -93,6 +99,12 @@
9399
--color-base0E: #d12765;
94100
--color-base0F: #8a3ffc;
95101

102+
--color-base0B-rgb: 25, 128, 56;
103+
--color-base08-rgb: 218, 30, 40;
104+
105+
--color-green-rgb: var(--color-base0B-rgb);
106+
--color-red-rgb: var(--color-base08-rgb);
107+
96108
--color-red-sidecar: #fb4b53;
97109
--color-yellow-sidecar: #fdd13a;
98110
--color-green-sidecar: #56d679;

plugins/plugin-client-common/web/scss/components/Editor/Editor.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
@import '_mixins';
1818
@import './theme-alignment.css';
19+
@import './diff.scss';
1920
@import '~monaco-editor/min/vs/editor/editor.main.css';
2021

2122
@include EditorContainer {
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright 2020 IBM Corporation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
@import '_mixins';
18+
19+
body[kui-theme-style] {
20+
.monaco-editor .inline-added-margin-view-zone,
21+
.monaco-diff-editor .line-insert,
22+
.monaco-diff-editor .char-insert,
23+
.monaco-editor .line-insert,
24+
.monaco-editor .char-insert {
25+
background-color: rgba(var(--color-green-rgb), 0.2);
26+
}
27+
28+
.monaco-editor .inline-deleted-margin-view-zone,
29+
.monaco-diff-editor .line-delete,
30+
.monaco-diff-editor .char-delete {
31+
background-color: rgba(var(--color-red-rgb), 0.2);
32+
}
33+
34+
canvas.modified.diffOverviewRuler {
35+
display: none;
36+
}
37+
canvas.original.diffOverviewRuler {
38+
display: none;
39+
}
40+
}

plugins/plugin-core-themes/web/scss/atelier-seaside.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ body[kui-theme='Atelier'] {
2525
--color-base0E: #ad2bee;
2626
--color-base0F: #e619c3;
2727

28+
--color-base0B-rgb: 41, 163, 41;
29+
--color-base08-rgb: 230, 25, 60;
30+
31+
--color-green-rgb: var(--color-base0B-rgb);
32+
--color-red-rgb: var(--color-base08-rgb);
33+
2834
--color-ui-06: hsla(120, 8%, 14%, 1);
2935

3036
--color-yellow: var(--color-base09);

plugins/plugin-core-themes/web/scss/dark.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ body[kui-theme='Dark'] {
2525
--color-base0E: #ffa0c2; /* MAGENTA: Keywords, Storage, Selector, Markup Italic, Diff Changed */
2626
--color-base0F: #d0b0ff; /* BROWN: Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?> */
2727

28+
--color-base0B-rgb: 61, 187, 97;
29+
--color-base08-rgb: 251, 75, 83;
30+
31+
--color-green-rgb: var(--color-base0B-rgb);
32+
--color-red-rgb: var(--color-base08-rgb);
33+
2834
--color-table-border1: #616466;
2935
--color-table-border2: #4d5358;
3036
--color-table-border3: #565151;

plugins/plugin-core-themes/web/scss/dracula.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ body[kui-theme='Dracula'] {
2525
--color-base0E: #b45bcf;
2626
--color-base0F: #00f769;
2727

28+
--color-base0A-rgb: 0, 247, 105;
29+
--color-base08-rgb: 234, 81, 178;
30+
31+
--color-green-rgb: var(--color-base0A-rgb);
32+
--color-red-rgb: var(--color-base08-rgb);
33+
2834
--color-green: var(--color-base0A);
2935
--color-yellow: var(--color-base0B);
3036

plugins/plugin-core-themes/web/scss/gruvbox-dark-medium.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ body[kui-theme='Gruvbox'] {
2525
--color-base0E: #d3869b;
2626
--color-base0F: #d65d0e;
2727

28+
--color-base08-rgb: 251, 73, 52;
29+
--color-red-rgb: var(--color-base08-rgb);
30+
--color-base0B-rgb: 184, 187, 38;
31+
--color-green-rgb: var(--color-base0B-rgb);
32+
2833
--color-latency-0: #1b7837;
2934
--color-latency-1: #7fbf7b;
3035
--color-latency-2: #d9f0d3;

plugins/plugin-core-themes/web/scss/light.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ body[kui-theme='Light'] {
9595
--color-base0E: #d12764;
9696
--color-base0F: #8a3ffc;
9797

98+
--color-base0B-rgb: 29, 189, 90;
99+
--color-green-rgb: var(--color-base0B-rgb);
100+
--color-base08-rgb: 231, 29, 50;
101+
--color-red-rgb: var(--color-base08-rgb);
102+
98103
--color-name: var(--color-base0D);
99104
--color-map-key: var(--color-base0D);
100105

plugins/plugin-core-themes/web/scss/lucario.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ body[kui-theme='Lucario'] {
2727
--color-base0E: #ff73fd;
2828
--color-base0F: #e6b5ff;
2929

30+
--color-base08-rgb: 255, 108, 96;
31+
--color-green-rgb: var(--color-base0B-rgb);
32+
--color-base0B-rgb: 142, 228, 120;
33+
--color-red-rgb: var(--color-base08-rgb);
34+
3035
--color-ui-06: hsla(209, 25%, 22%, 1);
3136

3237
--color-latency-0: #1b7837;

plugins/plugin-core-themes/web/scss/monokai.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ body[kui-theme='Monokai'] {
2424
--color-base0D: #66d9ef;
2525
--color-base0E: #ae81ff;
2626
--color-base0F: #cc6633;
27+
28+
--color-base08-rgb: 249, 38, 114;
29+
--color-red-rgb: var(--color-base08-rgb);
30+
--color-base0B-rgb: 166, 226, 46;
31+
--color-green-rgb: var(--color-base0B-rgb);
2732
}

0 commit comments

Comments
 (0)