]> git.lizzy.rs Git - rust.git/commitdiff
Improve Rust Documentation & Reference on mobile
authorKevin Yap <me@kevinyap.ca>
Wed, 14 Jan 2015 04:15:09 +0000 (20:15 -0800)
committerKevin Yap <me@kevinyap.ca>
Wed, 14 Jan 2015 06:39:52 +0000 (22:39 -0800)
- 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.

src/doc/rust.css
src/librustdoc/markdown.rs

index 128d75468e6f4239274d463943b91f784b7ca863..3f59f12e74ca3cd5d28ba0d60eebf506800e2429 100644 (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 {
index ab9c4ef942230bcc7a94ee0203085c42aeb4fc95..dc98a56eb1a4e7c1ed598ed393f9d099d44c6e60 100644 (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>