add error squiggles to brush editor

gosh I hate this code. CSS custom highlight API when, pleeeeeease Firefooooox
This commit is contained in:
りき萌 2024-09-06 22:50:25 +02:00
parent c59a651ea3
commit ec773b7fe1
5 changed files with 259 additions and 45 deletions

View file

@ -193,6 +193,8 @@ rkgk-code-editor {
&>.line {
flex-shrink: 0;
white-space: pre-wrap;
min-height: var(--line-height-em);
}
}
@ -225,7 +227,27 @@ rkgk-code-editor {
}
}
}
&>.layer:not(.layer-gutter) {
margin-left: var(--gutter-width);
width: calc(100% - var(--gutter-width));
}
&>.layer-error-squiggles {
color: transparent;
&>.line {
&>.squiggle {
text-decoration: underline wavy black;
text-decoration-skip-ink: none;
}
&>.squiggle-error {
text-decoration-color: var(--color-error);
}
}
}
&>textarea {
display: block;
width: calc(100% - var(--gutter-width));