Improve Rust Documentation & Reference on mobile

- Tables that are too wide for the screen scroll horizontally.
- Inline code that would force the page to become wider than the width
  of the screen is broken in the middle of the word.
This commit is contained in:
Kevin Yap 2015-01-13 20:15:09 -08:00
parent 170c4399e6
commit 5a16ceb291
2 changed files with 4 additions and 1 deletions

View File

@ -195,6 +195,7 @@ h5 a:hover {text-decoration: none;}
pre, code {
font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
word-wrap: break-word;
}
pre {
border-left: 2px solid #eee;
@ -204,7 +205,6 @@ pre {
margin: 20px 0;
font-size: 13px;
word-break: break-all;
word-wrap: break-word;
}
code {
padding: 0 2px;
@ -315,6 +315,8 @@ hr {
table {
border-collapse: collapse;
border-spacing: 0;
overflow-x: auto;
display: block;
}
table tr.odd {

View File

@ -91,6 +91,7 @@ pub fn render(input: &str, mut output: Path, matches: &getopts::Matches,
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<title>{title}</title>