]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: refactor and unstyle inline section headers
authorAdrien Tétar <adri-from-59@hotmail.fr>
Sat, 26 Apr 2014 12:09:19 +0000 (21:09 +0900)
committerAdrien Tétar <adri-from-59@hotmail.fr>
Sat, 26 Apr 2014 12:27:42 +0000 (21:27 +0900)
src/librustdoc/html/markdown.rs
src/librustdoc/html/render.rs
src/librustdoc/html/static/main.css

index fa285185a61840f156a306b581f711bead9af929..fab3ca80099b92c5f0fc71c736ea08336bd775ea 100644 (file)
@@ -209,7 +209,7 @@ pub fn render(w: &mut io::Writer, s: &str, print_toc: bool) -> fmt::Result {
         };
 
         // Render the HTML
-        let text = format!(r#"<h{lvl} id="{id}" class='section-link'><a
+        let text = format!(r#"<h{lvl} id="{id}" class='section-header'><a
                            href="\#{id}">{sec_len,plural,=0{}other{{sec} }}{}</a></h{lvl}>"#,
                            s, lvl = level, id = id,
                            sec_len = sec.len(), sec = sec);
index 539eb42305c77c278c4b5339b1d257530f3d0a18..63aec6395c3a071f3e3493c7c05e52c3c01dfdf6 100644 (file)
@@ -1121,7 +1121,7 @@ fn cmp(i1: &clean::Item, i2: &clean::Item, idx1: uint, idx2: uint) -> Ordering {
                 clean::MacroItem(..)           => ("macros", "Macros"),
             };
             try!(write!(w,
-                        "<h2 id='{id}' class='section-link'>\
+                        "<h2 id='{id}' class='section-header'>\
                         <a href=\"\\#{id}\">{name}</a></h2>\n<table>",
                         id = short, name = name));
         }
index b5ce3919bdd79bf790fbf1b39cdb45f12be37706..db49a5ab18cbb221cb3ceff462bf9e334088d65c 100644 (file)
@@ -388,16 +388,17 @@ pre.rust .doccomment { color: #4D4D4C; }
 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
 pre.rust .lifetime { color: #B76514; }
 
-h1.section-link:hover a:after,
-h2.section-link:hover a:after,
-h3.section-link:hover a:after,
-h4.section-link:hover a:after,
-h5.section-link:hover a:after,
-h6.section-link:hover a:after {
-  content: '\2002\00a7\2002';
+.section-header {
+    border-bottom: none !important;
+    font-size: 1.1em !important;
+    margin: 0 !important;
+    padding: 0 !important;
+}
+.section-header:hover a:after {
+    content: '\2002\00a7\2002';
 }
 
-/** Media Queries **/
+/* Media Queries */
 
 @media (max-width: 700px) {
     .sidebar {