diff options
| author | Kevin Yap <me@kevinyap.ca> | 2015-01-13 20:15:09 -0800 |
|---|---|---|
| committer | Kevin Yap <me@kevinyap.ca> | 2015-01-13 22:39:52 -0800 |
| commit | 5a16ceb291fd1b021efc342e3058c0f1ce534778 (patch) | |
| tree | 3a57ac47fddd3a65cfd7809558955b6b1cb692ba | |
| parent | 170c4399e614fe599c3d41306b3429ca8b3b68c6 (diff) | |
| download | rust-5a16ceb291fd1b021efc342e3058c0f1ce534778.tar.gz rust-5a16ceb291fd1b021efc342e3058c0f1ce534778.zip | |
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.
| -rw-r--r-- | src/doc/rust.css | 4 | ||||
| -rw-r--r-- | src/librustdoc/markdown.rs | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/doc/rust.css b/src/doc/rust.css index 128d75468e6..3f59f12e74c 100644 --- a/src/doc/rust.css +++ b/src/doc/rust.css @@ -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 { diff --git a/src/librustdoc/markdown.rs b/src/librustdoc/markdown.rs index ab9c4ef9422..dc98a56eb1a 100644 --- a/src/librustdoc/markdown.rs +++ b/src/librustdoc/markdown.rs @@ -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> |
