Switch from an overlay to an underlay so the highlight colors do not impact the text.

This commit is contained in:
Tom Alexander 2024-01-12 22:39:00 -05:00
parent 949e02af2f
commit b52ee91745
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 13 additions and 7 deletions

View File

@ -9,11 +9,19 @@
flex: 1;
flex-basis: 0;
position: relative;
background: white;
}
.Editor-textarea {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
background-color: transparent;
}
.Editor-ast {
@ -21,11 +29,9 @@
background: green;
}
.Editor-overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
.Editor-underlay {
width: 100%;
height: 100%;
pointer-events: none;
/* background: orange; */
}

View File

@ -8,8 +8,8 @@ function Editor() {
return (
<div className="Editor">
<div className="Editor-textwrapper">
<div className="Editor-overlay"></div>
<textarea onChange={handleChange} className="Editor-textarea">I have text</textarea>
<div className="Editor-underlay"></div>
</div>
<div className="Editor-ast"></div>
</div>