fix: Fix styling when correct and default matches span multiple lines #225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this change?
Fixes an issue where as a result of changes in #169, match styling would not apply correctly when matches were broken across lines.
Previously, we were using the
:after
pseudo element to achieve this effect with a background image. This doesn't play nicely with the multiple border-boxes that constitute a broken span, but border-image (TIL!) does.One caveat – the green line is some subpixel-width fatter than before, I think as a result of being exactly rather than approximately 3px. I think it's still clear. Sadly, I haven't found a way to make match the previous styling exactly, and the next pixel down looks too thin to me: happy to revise. Here's the thinner line:
Tested in Chrome and Firefox.
How to test
Run locally in the sandbox, or use the instructions in 'Testing locally in applications ...' to test in Composer. Do match decorations now behave themselves when split over multiple lines?