about summary refs log tree commit diff
diff options
context:
space:
mode:
authormdinger <mdinger.bugzilla@gmail.com>2015-10-23 21:59:48 -0400
committermdinger <mdinger.bugzilla@gmail.com>2015-10-23 21:59:48 -0400
commit11c7bdd160d70b2ed92b11f0699f993a54267447 (patch)
tree83c468295588b0a0a56b4db2aec4827f028f81c6
parentb1e3baa5b477652e125890dba9ef101f841b8d15 (diff)
downloadrust-11c7bdd160d70b2ed92b11f0699f993a54267447.tar.gz
rust-11c7bdd160d70b2ed92b11f0699f993a54267447.zip
Add colors for rustdoc primitives, type, and macros links
-rw-r--r--src/librustdoc/html/format.rs4
-rw-r--r--src/librustdoc/html/static/main.css3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index d12c5d2c6fb..79585a94cd0 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -378,7 +378,7 @@ fn primitive_link(f: &mut fmt::Formatter,
         Some(&LOCAL_CRATE) => {
             let len = CURRENT_LOCATION_KEY.with(|s| s.borrow().len());
             let len = if len == 0 {0} else {len - 1};
-            try!(write!(f, "<a href='{}primitive.{}.html'>",
+            try!(write!(f, "<a class='primitive' href='{}primitive.{}.html'>",
                         repeat("../").take(len).collect::<String>(),
                         prim.to_url_str()));
             needs_termination = true;
@@ -398,7 +398,7 @@ fn primitive_link(f: &mut fmt::Formatter,
             };
             match loc {
                 Some(root) => {
-                    try!(write!(f, "<a href='{}{}/primitive.{}.html'>",
+                    try!(write!(f, "<a class='primitive' href='{}{}/primitive.{}.html'>",
                                 root,
                                 path.0.first().unwrap(),
                                 prim.to_url_str()));
diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css
index 7d6dd1063db..a90bf17601f 100644
--- a/src/librustdoc/html/static/main.css
+++ b/src/librustdoc/html/static/main.css
@@ -415,6 +415,9 @@ a {
 .content span.mod, .content a.mod, block a.current.mod { color: #4d76ae; }
 .content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
 .content span.struct, .content a.struct, .block a.current.struct { color: #e53700; }
+.content a.primitive { color: #39a7bf; }
+.content a.type { color: #e57300; }
+.content a.macro { color: #068000; }
 .content span.fn, .content a.fn, .block a.current.fn,
 .content span.method, .content a.method, .block a.current.method,
 .content span.tymethod, .content a.tymethod, .block a.current.tymethod,