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

doc: made code spans more visible #3573

Closed
wants to merge 1 commit into from

Conversation

phillipj
Copy link
Member

This makes the code spans in the API docs alot more visible and therefore readable by adding some background color. Its more or less what github.com does, and what we decided to do on nodejs.org with nodejs/nodejs.org#146.

Closes an issue raised about API docs readability in nodejs/nodejs.org#121.

skjermbilde 2015-10-28 kl 21 01 38

@mscdex mscdex added the doc Issues and PRs related to the documentations. label Oct 28, 2015
@evanlucas
Copy link
Contributor

LGTM

@@ -339,6 +339,8 @@ p code,
li code {
font-size: 0.9em;
color: #040404;
background-color: #f2f5f0;
padding: 0.2em;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a padding of 0.2em 0.4em would look better visually, it's what GitHub does too (They do it through a unicode space in :before and :after) to make the left and right padding slightly larger.

@jasnell
Copy link
Member

jasnell commented Oct 29, 2015

LGTM

@phillipj phillipj force-pushed the doc-code-visibility branch from cca141e to ef2e668 Compare October 29, 2015 21:22
@phillipj
Copy link
Member Author

I think a padding of 0.2em 0.4em would look better visually

@silverwind agreed, just updated with a little extra horizontal padding.

skjermbilde 2015-10-29 kl 22 20 17

@silverwind
Copy link
Contributor

LGTM

One thing that bugs me a bit is that #f2f5f0 is hard to discern from the #fff background, at least on my display, but that applies to code blocks as well. Maybe a tiny bit darker would be nice, but that's material for another PR.

silverwind pushed a commit that referenced this pull request Oct 29, 2015
This makes the code spans in the API docs more visible and
therefore readable by adding some background color.

PR-URL: #3573
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
@silverwind
Copy link
Contributor

Thanks. Landed in d995b72.

@silverwind silverwind closed this Oct 29, 2015
@phillipj phillipj deleted the doc-code-visibility branch October 29, 2015 22:01
@phillipj
Copy link
Member Author

phillipj commented Nov 4, 2015

Any chance this could be backported to v4.x and v5.x aswell @silverwind?

@jasnell
Copy link
Member

jasnell commented Nov 4, 2015

There shouldn't be any problem getting this in to v4 :-)

rvagg pushed a commit that referenced this pull request Nov 7, 2015
This makes the code spans in the API docs more visible and
therefore readable by adding some background color.

PR-URL: #3573
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
@Fishrock123 Fishrock123 mentioned this pull request Nov 11, 2015
MylesBorins pushed a commit that referenced this pull request Nov 16, 2015
This makes the code spans in the API docs more visible and
therefore readable by adding some background color.

PR-URL: #3573
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
@MylesBorins
Copy link
Contributor

landed in lts-v4.x-staging as 08ab9f3

@MylesBorins
Copy link
Contributor

@silverwind does this need a land-on-v5.x tag if it is on master?

@silverwind
Copy link
Contributor

@thealphanerd No, that tag was unnecessary ;)

@MylesBorins
Copy link
Contributor

thumbs up

@phillipj
Copy link
Member Author

Thanks @thealphanerd!

rvagg pushed a commit that referenced this pull request Dec 4, 2015
This makes the code spans in the API docs more visible and
therefore readable by adding some background color.

PR-URL: #3573
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
@jasnell jasnell mentioned this pull request Dec 17, 2015
jasnell pushed a commit that referenced this pull request Dec 17, 2015
This makes the code spans in the API docs more visible and
therefore readable by adding some background color.

PR-URL: #3573
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
jasnell pushed a commit that referenced this pull request Dec 23, 2015
This makes the code spans in the API docs more visible and
therefore readable by adding some background color.

PR-URL: #3573
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
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.

6 participants