diff options
| author | Adrien Tétar <adri-from-59@hotmail.fr> | 2014-03-09 12:29:25 +0100 |
|---|---|---|
| committer | Adrien Tétar <adri-from-59@hotmail.fr> | 2014-03-09 18:45:11 +0100 |
| commit | 7979ae53678e6d1a1f8455ee543986498afa270f (patch) | |
| tree | 904b21f9a1e3d9667877c534b9d2839f20023b97 | |
| parent | 9eadcacdd76d12c72284ddc122625488f297dea8 (diff) | |
| download | rust-7979ae53678e6d1a1f8455ee543986498afa270f.tar.gz rust-7979ae53678e6d1a1f8455ee543986498afa270f.zip | |
doc: CSS fixes
- fixup and refactor highlighting code - have a proper print stylesheet
| -rw-r--r-- | src/doc/rust.css | 34 | ||||
| -rw-r--r-- | src/librustdoc/html/static/main.css | 17 | ||||
| -rw-r--r-- | src/librustdoc/markdown.rs | 2 |
3 files changed, 32 insertions, 21 deletions
diff --git a/src/doc/rust.css b/src/doc/rust.css index 26681adad6d..c69b59855a7 100644 --- a/src/doc/rust.css +++ b/src/doc/rust.css @@ -75,6 +75,14 @@ p { margin: 0 0 10px; } +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + footer { border-top: 1px solid #ddd; font-size: 12px; @@ -107,6 +115,8 @@ a:hover, a:active { h1 a:link, h1 a:visited, h2 a:link, h2 a:visited, h3 a:link, h3 a:visited, h4 a:link, h4 a:visited, h5 a:link, h5 a:visited {color: black;} +h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, +h5 a:hover {text-decoration: none;} /* Code ========================================================================== */ @@ -144,16 +154,14 @@ pre code { /* Code highlighting */ pre.rust .kw { color: #8959A8; } pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; } -pre.rust .number { color: #718C00; } -pre.rust .self { color: #C13928; } -pre.rust .boolval { color: #C13928; } -pre.rust .prelude-val { color: #C13928; } +pre.rust .number, pre.rust .string { color: #718C00; } +pre.rust .self, pre.rust .boolval, pre.rust .prelude-val, +pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; } pre.rust .comment { color: #8E908C; } pre.rust .doccomment { color: #4D4D4C; } -pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999f; } -pre.rust .string { color: #718C00; } -pre.rust .lifetime { color: #C13928; } -pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; } +pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; } +pre.rust .lifetime { color: #B76514; } + /* The rest ========================================================================== */ @@ -162,7 +170,7 @@ pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; } margin: 0.5em; font-size: 1.1em; } -@media (min-width: 768px) { +@media only screen, handheld and (min-width: 768px) { #versioninfo { position: fixed; bottom: 0px; @@ -262,9 +270,12 @@ table th { a, a:visited { text-decoration: underline; } - a[href]:after { + p a[href]:after { content: " (" attr(href) ")"; } + footer a[href]:after { + content: ""; + } a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } @@ -275,6 +286,9 @@ table th { @page { margin: 2cm .5cm; } + h1:not(.title), h2, h3 { + border-bottom: 0px none; + } p, h2, h3 { orphans: 3; widows: 3; diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css index 0efee51a219..f2c10f053c2 100644 --- a/src/librustdoc/html/static/main.css +++ b/src/librustdoc/html/static/main.css @@ -126,7 +126,7 @@ nav.sub { .content pre.line-numbers { float: left; border: none; } .line-numbers span { color: #c67e2d; } .line-numbers .line-highlighted { - background-color: #fff871; + background-color: #f6fdb0; } .content .highlighted { @@ -306,19 +306,16 @@ a { pre.rust, pre.line-numbers { background-color: #FDFDFD; } -/* Code Highlighting */ +/* Code highlighting */ pre.rust .kw { color: #8959A8; } pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; } -pre.rust .number { color: #718C00; } -pre.rust .self { color: #C13928; } -pre.rust .boolval { color: #C13928; } -pre.rust .prelude-val { color: #C13928; } +pre.rust .number, pre.rust .string { color: #718C00; } +pre.rust .self, pre.rust .boolval, pre.rust .prelude-val, +pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; } pre.rust .comment { color: #8E908C; } pre.rust .doccomment { color: #4D4D4C; } -pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999f; } -pre.rust .string { color: #718C00; } -pre.rust .lifetime { color: #C13928; } -pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; } +pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; } +pre.rust .lifetime { color: #B76514; } h1:hover a:after, h2:hover a:after, diff --git a/src/librustdoc/markdown.rs b/src/librustdoc/markdown.rs index 5d8e0008b87..7ab3fe017b9 100644 --- a/src/librustdoc/markdown.rs +++ b/src/librustdoc/markdown.rs @@ -117,7 +117,7 @@ pub fn render(input: &str, mut output: Path, matches: &getopts::Matches) -> int let err = write!( &mut out, - r#"<!doctype html> + r#"<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> |
