diff --git a/src/lib/components/JSONEditor.scss b/src/lib/components/JSONEditor.scss index 8fe5e3fe..d29adde6 100644 --- a/src/lib/components/JSONEditor.scss +++ b/src/lib/components/JSONEditor.scss @@ -12,6 +12,9 @@ display: flex; flex-direction: row; - &.jse-focus { + // lighter selection color when the editor doesn't have focus + &:not(.jse-focus) { + --jse-selection-background-color: #{$selection-background-inactive-color}; + --jse-context-menu-pointer-background: #{$context-menu-pointer-hover-background}; } } diff --git a/src/lib/components/__snapshots__/JSONEditor.test.ts.snap b/src/lib/components/__snapshots__/JSONEditor.test.ts.snap index c08f86bb..113c9341 100644 --- a/src/lib/components/__snapshots__/JSONEditor.test.ts.snap +++ b/src/lib/components/__snapshots__/JSONEditor.test.ts.snap @@ -4,10 +4,10 @@ exports[`JSONEditor > render table mode 1`] = `
0 |
- 1
+
-
-
-
-
-
-
+ 1
+
+
+
+
+
+
+
|
+
-
-
-
-
-
-
+
+
+
+
+
+
+
|
---|---|---|
1 |
- 2
+
-
-
-
-
-
-
+ 2
+
+
+
+
+
+
+
|
- Joe
+
-
-
-
-
-
-
+ Joe
+
+
+
+
+
+
+
|
2 |
- 3
+
-
-
-
-
-
-
+ 3
+
+
+
+
+
+
+
|
+
-
-
-
-
-
-
+
+
+
+
+
+
+
|
@@ -469,7 +493,7 @@ exports[`JSONEditor > render text mode 1`] = ` |