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

docs: fix alignment of line number with code examples #16671

Closed
wants to merge 1 commit into from
Closed

docs: fix alignment of line number with code examples #16671

wants to merge 1 commit into from

Conversation

Tanujkanti4441
Copy link
Contributor

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

just added a line height property to syntax-highlighter.scss file for making the alignment of line numbers with the code in examples

before.
Screenshot 2022-12-16 000348

after this PR

Screenshot 2022-12-16 001930

Is there anything you'd like reviewers to focus on?

@Tanujkanti4441 Tanujkanti4441 requested a review from a team as a code owner December 16, 2022 08:30
@eslint-github-bot eslint-github-bot bot added triage An ESLint team member will look at this issue soon documentation Relates to ESLint's documentation labels Dec 16, 2022
@netlify
Copy link

netlify bot commented Dec 16, 2022

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 6ca127d
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/639c2cbe394a140009b54190
😎 Deploy Preview https://deploy-preview-16671--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@amareshsm
Copy link
Member

Let's wait for this PR #16669. It includes some changes in styling also.

@@ -118,6 +118,7 @@ pre[class*="language-"] {
font-variant-numeric: tabular-nums;
text-align: right;
width: 1.2em;
line-height: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Mind sharing which browser and its version as well as the OS to reproduce the problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am seeing this problem in
Browser - Firefox
Version - 108.0.1 (latest)
Operating system - Windows 10 Pro (64-bit)

I am not getting this problem in Chrome browser but this fix (PR) is not affecting that

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, I can reproduce it in Firefox.

Seems the line-height for code has no effect under firefox, I'll see why it happens.

Actually I can find the problem even before my pull request (screenshots from https://eslint.org/docs/latest/rules/array-callback-return under firefox):

My pull request happened to expose it :)

Copy link
Contributor

Choose a reason for hiding this comment

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

So I compared the css rules before to those after my pull request and found there was one rule missing from my pr. Applying that rule to .line-numbers-wrapper seems to fix the problem under firefox:

.line-numbers-wrapper {
  font-variant-ligatures: none;
}

Could you try it and verify if it works for you? I reckon it doesn't make sense to set line-height to 0, though it did work in this case under firefox.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is working for me,
ok then, i am closing this PR issue is all yours

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, I've updated that pull request to fix this issue.

@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jun 16, 2023
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation triage An ESLint team member will look at this issue soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants