Switch from an overlay to an underlay so the highlight colors do not impact the text.
This commit is contained in:
parent
949e02af2f
commit
b52ee91745
@ -9,11 +9,19 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Editor-textarea {
|
.Editor-textarea {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Editor-ast {
|
.Editor-ast {
|
||||||
@ -21,11 +29,9 @@
|
|||||||
background: green;
|
background: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Editor-overlay {
|
.Editor-underlay {
|
||||||
position: absolute;
|
width: 100%;
|
||||||
top: 0;
|
height: 100%;
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
/* background: orange; */
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ function Editor() {
|
|||||||
return (
|
return (
|
||||||
<div className="Editor">
|
<div className="Editor">
|
||||||
<div className="Editor-textwrapper">
|
<div className="Editor-textwrapper">
|
||||||
<div className="Editor-overlay"></div>
|
|
||||||
<textarea onChange={handleChange} className="Editor-textarea">I have text</textarea>
|
<textarea onChange={handleChange} className="Editor-textarea">I have text</textarea>
|
||||||
|
<div className="Editor-underlay"></div>
|
||||||
</div>
|
</div>
|
||||||
<div className="Editor-ast"></div>
|
<div className="Editor-ast"></div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user