From what I know, Scintilla 3.x has two kinds of background colors: non-transparent solid color under text and semi-transparent color fill above text. Notepad2 is using the second approach but it leads to poor contrast - for example, gray fill over selected text (black) so that not only selection's background becomes non-white but the text itself becomes non-black.
Luckily, Notepad2 allows using the first approach (non-transparent color under text) by simply removing alpha:N from the style's settings. However, if you remove it from Selected Text or Current Line Background and put selection or caret over a region like /regexp/ (that has its own non-alpha background in JS scheme) you will see that selection's/line's background entirely replaces the regexp's.
Is there a way to specify precedence for styles? So that Current Line Background can't overlay more specific styles (like that of regexp). Notepad++ handles this well even though it doesn't even permit transparency in style colors but is using background a lot:
<script>
var x
var [y]
lines 2-3 have slightly bluish background ("JavaScript embedded")
line 3 (with the caret and selection) has more bluish background ("Current line background")
y has further different background ("Selected text color")
Can we do the same?
On a related note, why removing alpha from Current Line Background causes Matching Braces to be drawn on white background whilst that style has no back setting?
From what I know, Scintilla 3.x has two kinds of background colors: non-transparent solid color under text and semi-transparent color fill above text. Notepad2 is using the second approach but it leads to poor contrast - for example, gray fill over selected text (black) so that not only selection's background becomes non-white but the text itself becomes non-black.
Luckily, Notepad2 allows using the first approach (non-transparent color under text) by simply removing
alpha:N
from the style's settings. However, if you remove it fromSelected Text
orCurrent Line Background
and put selection or caret over a region like/regexp/
(that has its own non-alpha background in JS scheme) you will see that selection's/line's background entirely replaces the regexp's.Is there a way to specify precedence for styles? So that
Current Line Background
can't overlay more specific styles (like that of regexp). Notepad++ handles this well even though it doesn't even permit transparency in style colors but is using background a lot:y
has further different background ("Selected text color")Can we do the same?
On a related note, why removing
alpha
fromCurrent Line Background
causesMatching Braces
to be drawn on white background whilst that style has noback
setting?