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

code highlight slightly misaligned #9381

Closed
thefourtheye opened this issue Oct 31, 2016 · 8 comments
Closed

code highlight slightly misaligned #9381

thefourtheye opened this issue Oct 31, 2016 · 8 comments
Labels
doc Issues and PRs related to the documentations.

Comments

@thefourtheye
Copy link
Contributor

  • Version: latest master and also LIVE
  • Platform: Web Browsers
  • Subsystem: doc

As seen in the screenprint, the very first line of code section is slightly indented, in all pages.

screen shot 2016-10-31 at 9 02 52 pm

cc @nodejs/documentation

@thefourtheye thefourtheye added the doc Issues and PRs related to the documentations. label Oct 31, 2016
@mscdex
Copy link
Contributor

mscdex commented Oct 31, 2016

Shouldn't we be using a monospace font for code or is this a padding issue?

Ah yep, it's a padding issue.

@addaleax
Copy link
Member

The font does seem to be monospace, this is some kind of CSS weirdness…

@thefourtheye
Copy link
Contributor Author

virtualbox_ubuntu_31_10_2016_22_39_28

This is the screenprint I managed to get from my Ubuntu VM.

@thefourtheye
Copy link
Contributor Author

The font is Monaco and it is a monospace font only.

@targos
Copy link
Member

targos commented Oct 31, 2016

The padding seems to apply only to the first line

@thefourtheye
Copy link
Contributor Author

@mscdex Looks like it is working. I tried this patch

diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css
index 1e82464..13f0ce6 100644
--- a/doc/api_assets/style.css
+++ b/doc/api_assets/style.css
@@ -358,7 +358,6 @@ tt, code {
   color: #040404;
   background-color: #f2f2f2;
   border-radius: 2px;
-  padding: .1em .3em;
 }

 a code {

and this is the result

screen shot 2016-11-01 at 1 59 43 am

![virtualbox_ubuntu_01_11_2016_02_04_13](https://cloud.githubusercontent.com/assets/696611/19870713/bf0b05da-9fd7-11e6-85a4-12eb8e0f06db.png)

@Fishrock123
Copy link
Contributor

Probably a bug from #8811?

I think we should be safe to remove the padding? Odd that it doesn't apply to multiple lines here... 🤔

@mscdex
Copy link
Contributor

mscdex commented Oct 31, 2016

The problem with just removing that line is that it also removes the padding from inline code, which to me does look better with the padding. Perhaps we need to have an inline code class that just has that padding or a code block class that overrides that padding?

danbev added a commit to danbev/node that referenced this issue Nov 10, 2016
I've noticed that a few of the code examples have an minor
indentation issue with the first line, for example:
https://nodejs.org/api/child_process.html#child_process_child_process

This commit attempt to fix this issue by using the solution provided
provided by silverwind and hiendv.

Fixes: nodejs#9381
addaleax pushed a commit that referenced this issue Nov 22, 2016
I've noticed that a few of the code examples have an minor
indentation issue with the first line, for example:

https://nodejs.org/api/child_process.html#child_process_child_process
This commit attempt to fix this issue by using the solution provided
provided by silverwind and hiendv.

Fixes: #9381
PR-URL: #9482
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this issue Dec 13, 2016
I've noticed that a few of the code examples have an minor
indentation issue with the first line, for example:

https://nodejs.org/api/child_process.html#child_process_child_process
This commit attempt to fix this issue by using the solution provided
provided by silverwind and hiendv.

Fixes: #9381
PR-URL: #9482
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this issue Dec 13, 2016
I've noticed that a few of the code examples have an minor
indentation issue with the first line, for example:

https://nodejs.org/api/child_process.html#child_process_child_process
This commit attempt to fix this issue by using the solution provided
provided by silverwind and hiendv.

Fixes: #9381
PR-URL: #9482
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this issue Dec 21, 2016
I've noticed that a few of the code examples have an minor
indentation issue with the first line, for example:

https://nodejs.org/api/child_process.html#child_process_child_process
This commit attempt to fix this issue by using the solution provided
provided by silverwind and hiendv.

Fixes: #9381
PR-URL: #9482
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this issue Dec 21, 2016
I've noticed that a few of the code examples have an minor
indentation issue with the first line, for example:

https://nodejs.org/api/child_process.html#child_process_child_process
This commit attempt to fix this issue by using the solution provided
provided by silverwind and hiendv.

Fixes: #9381
PR-URL: #9482
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants