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

HTML: use <kbd> and <samp> #355

Open
chris34 opened this issue Apr 7, 2019 · 0 comments
Open

HTML: use <kbd> and <samp> #355

chris34 opened this issue Apr 7, 2019 · 0 comments

Comments

@chris34
Copy link
Member

chris34 commented Apr 7, 2019

Use

  • <kbd> for keyboard shortcuts
  • <samp> for sample output from a computer

So the HTML could look like

<pre>
<samp>$ <kbd>git status<kbd>
# On branch master
nothing to commit, working directory clean</samp>
</pre>

As an idea for styling, some CSS:

kbd {
    display: inline-block;
    padding: 2px 6px 3px;
    background: #fff;
    color: #3B3E43;
    border: 1px solid #7d8186;
    line-height: 1em;
    box-shadow: 0 2px 0 -1px #fff,0 2px 0 #828282;
    font-size: 0.8em;
}

code {
    border: 1px solid #cccbcb;
    background-color: #eef;
    padding: 1px 5px;
    font-size: 0.8em;
}
@chris34 chris34 transferred this issue from another repository Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant