Skip to content

doc: Add padding: 0 to pre > code#9535

Closed
hiendv wants to merge 1 commit into
nodejs:masterfrom
hiendv:docs-fix-pre-code-padding
Closed

doc: Add padding: 0 to pre > code#9535
hiendv wants to merge 1 commit into
nodejs:masterfrom
hiendv:docs-fix-pre-code-padding

Conversation

@hiendv

@hiendv hiendv commented Nov 10, 2016

Copy link
Copy Markdown
Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

peek 2016-11-10 10-46

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Nov 10, 2016
@hiendv hiendv changed the title Add padding: 0; to pre > code doc: Add padding: 0 to pre > code Nov 10, 2016
@Trott

Trott commented Nov 10, 2016

Copy link
Copy Markdown
Member

LGTM if the @nodjes/Website folks (uh...there are 89 of them, so you know, not all of them, but at least a few) don't see a problem. I think there might be a competing fix for this already submitted, though. Anyone?

@Trott

Trott commented Nov 10, 2016

Copy link
Copy Markdown
Member

@nodejs/website

@danbev

danbev commented Nov 10, 2016

Copy link
Copy Markdown
Contributor

Thanks for doing this! We also have this PR open for this issue. I don't mind which PR gets merged just that we fix this :)

@hiendv

hiendv commented Nov 10, 2016

Copy link
Copy Markdown
Author

@Trott @danbev Sorry, I couldn't find #9482 before. Should I close mine?

@silverwind

Copy link
Copy Markdown
Contributor

Yeah, I'll close this in favor of #9482 which was first. I'm sorry and hope you find other areas to contribute.

@silverwind silverwind closed this Nov 10, 2016
@hiendv

hiendv commented Nov 10, 2016

Copy link
Copy Markdown
Author

I see. Thank you, @silverwind. I was hoping mine will be merged since the previous PR is incomplete.

@silverwind

silverwind commented Nov 10, 2016

Copy link
Copy Markdown
Contributor

I don't consider this change as the ideal solution as the <code> wrapping is unnecessary and ideally those block should just be <pre> only, with <code> being reserved for inline code blocks. That's why I requested a TODO comment.

If you like to take a look, the tool that generates the HTML lives here and you can run it through make doc-only.

@hiendv

hiendv commented Nov 10, 2016

Copy link
Copy Markdown
Author

@silverwind Oh, I missed your TODO here: #9482 (comment)

So, does it mean the <code> is deprecated for fenced code blocks?
If my assumption is right, should I change the doc generation tool & the style also? I would happily look at this and make a PR if possible.

@silverwind

silverwind commented Nov 10, 2016

Copy link
Copy Markdown
Contributor

I guess it's not as simple as I thought. The HTML5 spec recommends <pre><code></code></pre> for "a sample of computer code". While I don't particularily see a reason for it, I think it's best left as-is, so the solution here is likely proper.

@hiendv

hiendv commented Nov 11, 2016

Copy link
Copy Markdown
Author

@silverwind pre > code may be more semantic, I guess. Anyway, thanks for your time and patience.

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 this pull request may close these issues.

7 participants