Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix styling when correct and default matches span multiple lines #225

Merged
merged 3 commits into from
Aug 24, 2022

Conversation

jonathonherbert
Copy link
Contributor

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.

Before After
Screenshot 2022-08-24 at 09 43 19 Screenshot 2022-08-24 at 10 04 04

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:

Screenshot 2022-08-24 at 09 42 25

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?

@jonathonherbert jonathonherbert requested a review from a team August 24, 2022 09:17
Copy link
Contributor

@rebecca-thompson rebecca-thompson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested this locally, can replicate the bug and see this pr fix it

@jonathonherbert jonathonherbert merged commit 7ae9d98 into main Aug 24, 2022
@jonathonherbert jonathonherbert deleted the jsh/styling-tweaks branch August 24, 2022 10:19
@github-actions
Copy link

🎉 This PR is included in version 5.20.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants