@@ -64,6 +64,7 @@ import { Compartment, EditorState } from '@codemirror/state';
6464import type { LanguageSupport } from '@codemirror/language' ;
6565import { syntaxHighlighting , HighlightStyle } from '@codemirror/language' ;
6666import { tags as t } from '@lezer/highlight' ;
67+ import { rgba } from 'polished' ;
6768
6869const editorStyle = css ( {
6970 fontSize : 13 ,
@@ -78,10 +79,11 @@ const editorPalette = {
7879 backgroundColor : codePalette . light [ 0 ] ,
7980 gutterColor : palette . gray . base ,
8081 gutterBackgroundColor : palette . gray . light3 ,
81- gutterActiveLineBackgroundColor : palette . gray . light2 ,
82+ gutterActiveLineBackgroundColor : rgba ( palette . gray . light2 , 0.5 ) ,
8283 gutterFoldButtonColor : palette . black ,
8384 cursorColor : palette . gray . base ,
84- activeLineBackgroundColor : palette . gray . light2 ,
85+ // Semi-transparent opacity so that the selection background can still be seen.
86+ activeLineBackgroundColor : rgba ( palette . gray . light2 , 0.5 ) ,
8587 selectionBackgroundColor : palette . blue . light2 ,
8688 bracketBorderColor : palette . gray . light1 ,
8789 } ,
@@ -90,10 +92,11 @@ const editorPalette = {
9092 backgroundColor : codePalette . dark [ 0 ] ,
9193 gutterColor : palette . gray . light3 ,
9294 gutterBackgroundColor : palette . gray . dark3 ,
93- gutterActiveLineBackgroundColor : palette . gray . dark2 ,
95+ gutterActiveLineBackgroundColor : rgba ( palette . gray . dark2 , 0.5 ) ,
9496 gutterFoldButtonColor : palette . white ,
9597 cursorColor : palette . green . base ,
96- activeLineBackgroundColor : palette . gray . dark2 ,
98+ // Semi-transparent opacity so that the selection background can still be seen.
99+ activeLineBackgroundColor : rgba ( palette . gray . dark2 , 0.5 ) ,
97100 selectionBackgroundColor : palette . gray . dark1 ,
98101 bracketBorderColor : palette . gray . light1 ,
99102 } ,
0 commit comments