Change:
It's currently very bright and distracting (IMO). (Sorry :( ) Current scheme, for future triage/comparison purposes: !
I think I should reconsider my career in graphic design.
I'm looking at this.
(The relevant file is , if you're lost. :) )
BTW I was wondering, why not just use for src line numbering? Probably more optimized/idiomatic in the browser.
Also, it's pretty much impossible to have consistency between rustdoc and the old codemirror (tutorial) since both parsers behave very differently. would it be possible to pass the standalone documentation through rustdoc?
Doesn't this mean every line is a new tag? Also, it possibly screws with copy-paste and making the formatting consistent. This bug is specifically about the colour scheme of rustdoc since it's so wild. Also, about using rustdoc for everything.
My preference for the highlighting scheme is bold for keywords, green for macros, red for strings (the current color is fine), gray for comments (would be nice if code within comments were highlighted). I'd also like to hear more suggestions before we change it.
Something I hacked up a few days ago: ! (The macro colour wasn't "optimised" at all.)
No, it would look like this: I think it would be better to use that since that's the browser native numberings. No it doesn't. The identifier of a list aren't inlined with the content. is an example.
Oh, awesome. It does seem like a good idea, if you can get that to work.
Another note: current rustdoc parsing could be improved, i.e. the "ident" class corresponds to variable names, function names, paths, parameters... could be more split if you ask me.
The highlighting is performed by just by the token types the lexer (with a little bit of extra logic for attributes, macros and $ non-terminals in macros) and so does not have that information.

Discussion:
/* Code ========================================================================== */ pre, code { <del> font-family: Menlo, Monaco, Consolas, "Courier New", monospace; </del> <ins> font-family: Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; </ins> border-radius: 4px; } pre { <del> background-color: #F5F5F5; </del> <ins> background-color: #FDFDFD; </ins> border: 1px solid #CCC; border-radius: 0.5em; white-space: pre-wrap;

} /* Code highlighting */ <del> .cm-s-default span.cm-keyword {color: #803C8D;} </del> <ins> .cm-s-default span.cm-keyword {color: #8959A8;} </ins> .cm-s-default span.cm-atom {color: #219;} <del> .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;} </del> <ins> .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;} </ins> .cm-s-default span.cm-property {color: black;} .cm-s-default span.cm-operator {color: black;} <del> .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;} </del> <ins> .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;} </ins> .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;} <del> .cm-s-default span.cm-tag {color: #170;} </del> <ins> .cm-s-default span.cm-tag {color: #C82829;} </ins> .cm-s-default span.cm-attribute {color: #00C;} /* The rest

documentation: ~~~ <del> #[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", </del> <ins> #[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", </ins> html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://static.rust-lang.org/doc/master")]; ~~~

#[license = "MIT/ASL2"]; #[crate_type = "rlib"]; #[crate_type = "dylib"]; <del> #[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", </del> <ins> #[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", </ins> html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://static.rust-lang.org/doc/master")]; #[deny(unused_result, unused_must_use)];

<meta charset="utf-8" /> <title>{title}</title> <del> <link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400' </del> <ins> <link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400,700' </ins> rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="{root_path}{krate}/main.css">

} code, pre, h1.fqn { <del> font-family: Menlo, Monaco, Consolas, "Inconsolata", "Courier New", monospace; </del> <ins> font-family: "Inconsolata", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; </ins> } code, pre { color: #333;

:target { background: #FDFFD3; } <del> 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; } </del> <ins> 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; } </ins>

#[license = "MIT/ASL2"]; #[crate_type = "dylib"]; #[crate_type = "rlib"]; <del> #[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", </del> <ins> #[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", </ins> html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://static.rust-lang.org/doc/master")];

#[license = "MIT/ASL2"]; #[crate_type = "rlib"]; #[crate_type = "dylib"]; <del> #[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", </del> <ins> #[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", </ins> html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://static.rust-lang.org/doc/master")];