-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Remove padding in v-highlight
to fix display issues
#19740
Conversation
🦋 Changeset detectedLatest commit: 422917a The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
v-highlight
to fix various display issuesv-highlight
to fix display issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Remove padding in v-highlight to fix various display issues * Add changeset
Before
Before #19451
In #19451 an attempt was made to prevent the highlight background from being cut off (see left side):
After #19451
However, this led to an even stronger jump effect:
Although this jump effect could be prevented by always rendering text with
v-highlight
even if no search is applied (which feels like an unsafe requirement), there was still the problem that narrow letters are overlapped and the letters themselves are jumpy.After
I've tried various approaches (absolute background behind the letter, ...), but the only one that works reliably is to leave out the padding of the background completely:
A small disadvantage is that the highlighting is a bit less visible now. On the other hand, it makes it clearer which part is actually highlighted - before that fix it was sometimes not obvious (for example here one could think that the "l" is also marked):