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

Bu işleme şunda yer alıyor:
Tom Alexander 2024-01-12 22:39:00 -05:00
ebeveyn 949e02af2f
işleme b52ee91745
Veri tabanında bu imza için bilinen anahtar bulunamadı
GPG Anahtar Kimliği: D3A179C9A53C0EDE
2 değiştirilmiş dosya ile 13 ekleme ve 7 silme

Dosyayı Görüntüle

@ -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; */
}

Dosyayı Görüntüle

@ -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>