From fd09e91e0031448aa01829f55443c3669b264241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20T=C3=A9tar?= Date: Sun, 2 Mar 2014 12:04:50 +0100 Subject: [PATCH] rustdoc: tweak highlighting --- src/doc/rust.css | 24 +++++++++++----------- src/librustdoc/html/layout.rs | 2 +- src/librustdoc/html/static/main.css | 32 ++++++++++++++--------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/doc/rust.css b/src/doc/rust.css index 976c62beb03..17100274688 100644 --- a/src/doc/rust.css +++ b/src/doc/rust.css @@ -111,11 +111,11 @@ h5 a:link, h5 a:visited {color: black;} /* Code ========================================================================== */ pre, code { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-family: Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; border-radius: 4px; } pre { - background-color: #F5F5F5; + background-color: #FDFDFD; border: 1px solid #CCC; border-radius: 0.5em; white-space: pre-wrap; @@ -142,24 +142,24 @@ pre code { } /* Code highlighting */ -.cm-s-default span.cm-keyword {color: #803C8D;} +.cm-s-default span.cm-keyword {color: #8959A8;} .cm-s-default span.cm-atom {color: #219;} -.cm-s-default span.cm-number {color: #2AA198;} -.cm-s-default span.cm-def {color: #256EB8;} -.cm-s-default span.cm-variable {color: black;} -.cm-s-default span.cm-variable-2 {color: #817E61;} -.cm-s-default span.cm-variable-3 {color: #085;} +.cm-s-default span.cm-number {color: #3E999F;} +.cm-s-default span.cm-def {color: #4271AE;} +/*.cm-s-default span.cm-variable {color: #C82829;}*/ +.cm-s-default span.cm-variable-2 {color: #6F906C;} +.cm-s-default span.cm-variable-3 {color: #B76514;} .cm-s-default span.cm-property {color: black;} .cm-s-default span.cm-operator {color: black;} -.cm-s-default span.cm-comment {color: #A82323;} -.cm-s-default span.cm-string {color: #866544;} -.cm-s-default span.cm-string-2 {color: #F50;} +.cm-s-default span.cm-comment {color: #8E908C;} +.cm-s-default span.cm-string {color: #718C00;} +.cm-s-default span.cm-string-2 {color: #866544;} .cm-s-default span.cm-meta {color: #555;} /*.cm-s-default span.cm-error {color: #F00;}*/ .cm-s-default span.cm-qualifier {color: #555;} .cm-s-default span.cm-builtin {color: #30A;} .cm-s-default span.cm-bracket {color: #CC7;} -.cm-s-default span.cm-tag {color: #170;} +.cm-s-default span.cm-tag {color: #C82829;} .cm-s-default span.cm-attribute {color: #00C;} /* The rest diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index 708d3590517..c49df49dc11 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -35,7 +35,7 @@ pub fn render( {title} - diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css index 20c94d00711..84c7d33652c 100644 --- a/src/librustdoc/html/static/main.css +++ b/src/librustdoc/html/static/main.css @@ -43,7 +43,7 @@ h2 code, h3 code, h4 code { } code, pre, h1.fqn { - font-family: Menlo, Monaco, Consolas, "Inconsolata", "Courier New", monospace; + font-family: "Inconsolata", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; } code, pre { color: #333; @@ -304,18 +304,18 @@ a { :target { background: #FDFFD3; } -pre.rust .kw { color: #cc782f; } -pre.rust .kw-2 { color: #3bbb33; } -pre.rust .prelude-ty { color: #3bbb33; } -pre.rust .number { color: #c13928; } -pre.rust .self { color: #c13928; } -pre.rust .boolval { color: #c13928; } -pre.rust .prelude-val { color: #c13928; } -pre.rust .op { color: #cc782f; } -pre.rust .comment { color: #533add; } -pre.rust .doccomment { color: #d343d0; } -pre.rust .macro { color: #d343d0; } -pre.rust .macro-nonterminal { color: #d343d0; } -pre.rust .string { color: #c13928; } -pre.rust .lifetime { color: #d343d0; } -pre.rust .attribute { color: #d343d0 !important; } +pre.rust, pre.line-numbers { background-color: #FDFDFD; } + +/* 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 .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; }