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: make types in API docs not blend visually with description #3244

Closed
wants to merge 1 commit into from
Closed

doc: make types in API docs not blend visually with description #3244

wants to merge 1 commit into from

Conversation

thorn0
Copy link

@thorn0 thorn0 commented Oct 7, 2015

Let's make types look differently from the rest of the text at least somehow (color, italic, whatever).

That's what it looks like without this change:
image

@mscdex mscdex added the doc Issues and PRs related to the documentations. label Oct 7, 2015
@Trott
Copy link
Member

Trott commented Oct 7, 2015

I have no opinion on the aesthetics or the need, but the particular color choice here results in insufficient contrast for accessibility purposes. #00b192 on a white background has insufficient contrast to pass WCAG AA or WCAG AAA. The original value of #222 passes both AA and AAA on the other hand. Maybe try something closer to #005546 which will also pass AA and AAA.

@thorn0
Copy link
Author

thorn0 commented Oct 7, 2015

The thing is the contrast is needed not only with the background, but also with the normal text. If I change it to #005546, it blends again, at least to my eye. BTW, the color of the links in those docs is #ffa158, which doesn't pass AA and AAA as well.

@silverwind
Copy link
Contributor

How about something a bit more funky?

screen shot 2015-10-07 at 11 49 52 pm

(This highlights things not correctly classified as type, like Boolean above)

span.type {
    color: #FFF;
    background: #7AAB13;
    font-size: .7em;
    padding: 0 .2em;
    border-radius: 2px;
    position: relative;
    top: -.15em;
}

@jasnell
Copy link
Member

jasnell commented Nov 5, 2015

@nodejs/documentation

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Dec 14, 2015
@brendanashworth
Copy link
Contributor

Ref'ing to (issue) #4350 and (PR) #4378, the latter instead making these types link to MDN. This and #4378 are alternatives to eachother.

@claudiorodriguez
Copy link
Contributor

Please note that the point of #4741 (had to remake the PR) is to generate the links, the styling is incidental but the PRs will conflict with each other. I'd suggest waiting until #4741 is merged, then focusing on the styling on a new PR

@silverwind
Copy link
Contributor

47e926a has landed, making this PR obsolete. Thanks @fansworld-claudio!

@silverwind silverwind closed this Feb 9, 2016
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. stalled Issues and PRs that are stalled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants