-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Line highlight: Fixed top offset in combination with Line numbers #2237
Merged
RunDevelopment
merged 4 commits into
PrismJS:master
from
RunDevelopment:line-highlight-top-offset-fix
Dec 23, 2020
Merged
Line highlight: Fixed top offset in combination with Line numbers #2237
RunDevelopment
merged 4 commits into
PrismJS:master
from
RunDevelopment:line-highlight-top-offset-fix
Dec 23, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@siavashs I'm sorry but I can't figure out how to fix the alignment issue, so this pull request might take a while. |
siavashs
added a commit
to siavashs/Prism
that referenced
this pull request
May 31, 2020
Temporary fix for line highlight plugin offset until it's fixed by upstream. Fixes #27 Upstream PR PrismJS/prism#2237
siavashs
added a commit
to siavashs/Prism
that referenced
this pull request
May 31, 2020
Temporary fix for line highlight plugin offset until it's fixed by upstream. Fixes #27 Upstream PR PrismJS/prism#2237
mAAdhaTTah
reviewed
Jun 27, 2020
mAAdhaTTah
approved these changes
Dec 22, 2020
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.
This is basically gtg w/ a style nit + a refresh.
This was referenced Mar 6, 2021
This was referenced Mar 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds support for extra elements above the
<code>
element in combination with Line highlight and Line numbers.However, there is one problem I wasn't able to fix: The slight error of the alignment of the line highlight. The cause for the issue is that the
<code>
element isn't perfectly aligned with the<pre>
element (or any elements before it) which means that the line numbers are a few pixels too off. See #1132.Because the line highlight is aligned by measuring the line numbers, it's off as well.
You can see this issue everywhere on the Line numbers page.
There is actually another fix for #1132 apart from the one proposed by the reporter of the issue: Set
display: block
for the<code>
element.This is compatible with Coy but not with Funky. I also tried a few different things but none of them worked.
If possible, I'd like to include the fix of the alignment here as well (because it's very visible after this update) but I have no idea how to fix this.