From 0cc392d2d1244485611a24ef6a07d958edab9cde Mon Sep 17 00:00:00 2001 From: Daniel Fagnan Date: Tue, 18 Mar 2014 01:44:55 -0600 Subject: [PATCH 1/7] Tweaked the design to be a lot cleaner. Signed-off-by: Daniel Fagnan --- src/librustdoc/html/layout.rs | 2 +- src/librustdoc/html/static/main.css | 153 +++++++++++++++++++++++----- 2 files changed, 126 insertions(+), 29 deletions(-) diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index c49df49dc1111..e62e649d9ba60 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -51,7 +51,7 @@ pub fn render(
{logo, select, none{} other{ - + }} {sidebar} diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css index 2c7e5f0f67510..82a98ee9f8c33 100644 --- a/src/librustdoc/html/static/main.css +++ b/src/librustdoc/html/static/main.css @@ -30,20 +30,26 @@ body { padding-bottom: 20px; } -h1, .sidebar .location { - font: 700 22px "Oswald", Arial, sans-serif; -} -h2, h3, h4 { - font: 700 16px "Oswald", Arial, sans-serif; - text-transform: uppercase; -} h2 code, h3 code, h4 code { text-transform: none; font-size: 1.2em; } +h1 { + font: 600 26px "Helvetica Neue", Arial, sans-serif !important; + margin: 20px 0; +} + +h2, h3, h4 { + font: 500 20px "Helvetica Neue", Arial, sans-serif; + margin: 40px 0 20px 0; + padding-bottom: 15px; + border-bottom: 1px solid #DDDDDD; +} + code, pre, h1.fqn { font-family: "Inconsolata", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; + font-weight: normal; } code, pre { color: #333; @@ -54,6 +60,8 @@ pre { h1.fqn { font-size: 26px; font-weight: normal; + padding-bottom: 15px; + border-bottom: 1px dashed #D5D5D5; } nav { @@ -81,7 +89,6 @@ nav.sub { .js-only, .hidden { display: none; } .sidebar { - background: #e9e9e9; padding: 10px; } .sidebar img { @@ -89,34 +96,59 @@ nav.sub { display: block; } -.sidebar .location { margin-bottom: 10px; } +.sidebar .location { + font-size: 17px; + margin: 30px 0 20px 0; + background: #e1e1e1; + text-align: center; + color: #333; +} + +.sidebar .location a { + color: #333; +} + .sidebar .block, pre { background: #fff; } -.sidebar .block, pre, .content { border-bottom: 2px solid black; } -.trait { border-color: #fcae2b !important; } -.mod { border-color: #809fc7 !important; } -.enum { border-color: #93bc99 !important; } -.struct { border-color: #e53700 !important; } -.fn { border-color: #a2777f !important; } .block { padding: 10px; margin-bottom: 10px; } -.block h2 { margin-top: 0; } +.block h2 { + margin-top: 0; + text-align: center; +} + .block a { display: inline-block; - width: 100%; text-overflow: ellipsis; overflow: hidden; line-height: 15px; + margin: 0 0 0 45px; + padding-bottom: 4px; + border-bottom: 2px solid #fff; + font-size: 14px; + + transition: border 500ms ease-out; + -webkit-transition: border 500ms ease-out; + -moz-transition: border 500ms ease-out; + -o-transition: border 500ms ease-out; +} + +body p { + font-size: 15px; + line-height: 1.6; } .content { - background: #f3f3f3; padding: 20px 20px 20px 40px; } -.content h1 { margin-top: 0; } -.content h1, .content h2 { margin-left: -20px; } + +.content h1 { + margin-top: 0; + font-weight: 400 !important; +} + .content pre { padding: 20px; } .content.source pre.rust { white-space: pre; @@ -155,12 +187,31 @@ nav.sub { .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 { margin-left: 0; + margin: 40px 0 10px 0; + padding-bottom: 10px; + border-bottom: 1px solid #eee; } + .docblock h1 { font-size: 1.1em; } .docblock h2 { font-size: 1.05em; } .docblock h3, .docblock h4, .docblock h5 { font-size: 1em; } -.content .source { float: right; } +.docblock h3 { + font-size: 1.3em; +} + +.docblock h2 { + font-size: 1.5em; +} + +.content .source { + float: right; + font-size: 14px; + font-weight: 400; + padding: 9px 15px; + color: #333; +} + .content table { border-spacing: 0 5px; border-collapse: separate; @@ -224,7 +275,7 @@ a { background: transparent; } -.content a, .block a.current { font-weight: bold; } +.content a, .block a.current { font-weight: 400; } .content a.trait, .block a.current.trait { color: #ed9603; } .content a.mod, .block a.current.mod { color: #4d76ae; } @@ -235,16 +286,59 @@ a { .search-container { padding-right: 10px; - overflow: hidden; } .search-input { border: 2px solid #e9e9e9; border-radius: 2px; - width: 100%; + width: 85%; + box-sizing: content-box; + outline: none; + border: none; + background: none; + font-family: "Helvetica Neue"; + color: #000; + margin-top: 5px; + padding: 10px 20px; + font-weight: 300; + border-radius: 1px; + box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent; + color: #555555; + padding: 10px 16px; + line-height: 1.4; + font-size: 17px; + background-color: white; + -webkit-transition: background-color 50ms linear; + transition: background-color 50ms linear; + transition: border 500ms ease-out; + -webkit-transition: border 500ms ease-out; + -moz-transition: border 500ms ease-out; + -o-transition: border 500ms ease-out; + transition: box-shadow 500ms ease-out; + -webkit-transition: box-shadow 500ms ease-out; + -moz-transition: box-shadow 500ms ease-out; + -o-transition: box-shadow 500ms ease-out; +} + +.search-input:focus { + border-color: #66afe9; + border: 0; + outline: 0; + box-shadow: 0 0 0 1px #078dd8, 0 0 0 2px #078dd8; } + .do-search { float: right; - width: 62px; + outline: none; + border: none; + font-family: Helvetica Neue; + font-weight: 200; + color: #fff; + padding: 14px 25px; + margin-top: 3px; + font-size: 16px; + margin-right: 15px; + text-align: center; + background: #6F5E59; } .search-results .desc { white-space: nowrap; @@ -288,13 +382,16 @@ a { } .stability { - border-left: 5px solid #000; + border-left: 6px solid #000; border-radius: 3px; - padding: 0 3px; - float: right; + padding: 8px 3px; background: #fff; text-transform: lowercase; + display: block; + padding-left: 10px; + margin-bottom: 20px; } + .stability.Deprecated { border-color: #D60027; color: #880017; } .stability.Experimental { border-color: #EC5315; color: #a53c0e; } .stability.Unstable { border-color: #FFD700; color: #b39800; } From 598b5af9a122abac0f7674539e8aec7c8e823059 Mon Sep 17 00:00:00 2001 From: Daniel Fagnan Date: Wed, 19 Mar 2014 16:33:03 -0600 Subject: [PATCH 2/7] fixed issues Signed-off-by: Daniel Fagnan --- src/librustdoc/html/static/main.css | 52 +++++++++++++++++++---------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css index 82a98ee9f8c33..275b5be45da35 100644 --- a/src/librustdoc/html/static/main.css +++ b/src/librustdoc/html/static/main.css @@ -130,9 +130,6 @@ nav.sub { font-size: 14px; transition: border 500ms ease-out; - -webkit-transition: border 500ms ease-out; - -moz-transition: border 500ms ease-out; - -o-transition: border 500ms ease-out; } body p { @@ -285,16 +282,18 @@ a { .content .fnname { color: #8c6067; } .search-container { - padding-right: 10px; + width: 60%; + margin-left: 50px; } + .search-input { border: 2px solid #e9e9e9; border-radius: 2px; - width: 85%; + width: 95%; box-sizing: content-box; outline: none; border: none; - background: none; + background-color: white; font-family: "Helvetica Neue"; color: #000; margin-top: 5px; @@ -306,17 +305,10 @@ a { padding: 10px 16px; line-height: 1.4; font-size: 17px; - background-color: white; - -webkit-transition: background-color 50ms linear; + transition: background-color 50ms linear; transition: border 500ms ease-out; - -webkit-transition: border 500ms ease-out; - -moz-transition: border 500ms ease-out; - -o-transition: border 500ms ease-out; transition: box-shadow 500ms ease-out; - -webkit-transition: box-shadow 500ms ease-out; - -moz-transition: box-shadow 500ms ease-out; - -o-transition: box-shadow 500ms ease-out; } .search-input:focus { @@ -327,7 +319,7 @@ a { } .do-search { - float: right; + display: none; outline: none; border: none; font-family: Helvetica Neue; @@ -336,10 +328,11 @@ a { padding: 14px 25px; margin-top: 3px; font-size: 16px; - margin-right: 15px; text-align: center; - background: #6F5E59; + background: #5B6672; + margin-left: 10px; } + .search-results .desc { white-space: nowrap; text-overflow: ellipsis; @@ -422,3 +415,28 @@ h5.section-link:hover a:after, h6.section-link:hover a:after { content: ' § '; } + +/** Media Queries **/ + +@media (max-width: 620px) { + .search-container { + display: block; + width: 100%; + margin-left: 0px; + } +} + +@media (max-width: 700px) { + .sidebar { + display: none; + } + + .content { + margin-left: 0px; + } + + nav.sub { + width: 80%; + margin: 0 auto; + } +} From ada599255b5f6fd03d8c3a9e08374c1d61f7cbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20T=C3=A9tar?= Date: Thu, 20 Mar 2014 19:05:22 +0100 Subject: [PATCH 3/7] doc: design changes cleanups --- src/librustdoc/html/layout.rs | 6 +- src/librustdoc/html/static/main.css | 145 +++++++--------------------- 2 files changed, 39 insertions(+), 112 deletions(-) diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index e62e649d9ba60..ca0252296d790 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -33,9 +33,12 @@ pub fn render( + + + {title} - @@ -59,7 +62,6 @@ pub fn render( diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css index 2b681bcf32166..ddfc2a67dd733 100644 --- a/src/librustdoc/html/static/main.css +++ b/src/librustdoc/html/static/main.css @@ -45,7 +45,6 @@ h2, h3, h4 { border-bottom: 1px solid #DDDDDD; } h2 code, h3 code, h4 code { - font-size: 1.2em; } @@ -233,32 +232,37 @@ a { background: transparent; } -.content a.trait, .block a.current.trait { color: #ed9603; } -.content a.mod, .block a.current.mod { color: #4d76ae; } -.content a.enum, .block a.current.enum { color: #5e9766; } +.content a.trait, .block a.current.trait { color: #FFA000; } +.content a.mod, .block a.current.mod { color: #377BD8; } +.content a.enum, .block a.current.enum { color: #5ED66E; } .content a.struct, .block a.current.struct { color: #e53700; } -.content a.fn, .block a.current.fn { color: #8c6067; } -.content .fnname { color: #8c6067; } +.content a.fn, .block a.current.fn { color: #CE3D54; } +.content .fnname { color: #CE3D54; } .search-input { width: 100%; + outline: none; /* Override Normalize.css: we have margins and do not want to overflow - the `moz` attribute is necessary until Firefox 29, too early to drop at this point */ -moz-box-sizing: border-box !important; box-sizing: border-box !important; - outline: none; - border: none; - border-radius: 1px; + display: inline-block; + border: 2px solid #e9e9e9; + border-radius: 2px; + width: 75%; + box-sizing: content-box; color: #555; margin-top: 5px; padding: 10px 16px; font-size: 17px; font-weight: 300; box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent; + transition: background-color 50ms linear; transition: border 500ms ease-out; transition: box-shadow 500ms ease-out; + transition: width 300ms ease-out; } .search-input:focus { @@ -268,6 +272,25 @@ a { box-shadow: 0 0 0 1px #078dd8, 0 0 0 2px #078dd8; } +.search { + display: inline-block; + width: 100px; + cursor: pointer; + font-family: Helvetica Neue; + font-weight: 200; + color: #fff; + padding: 13px 25px; + border: 1px solid #343E49; + margin-top: 4px; + font-size: 16px; + text-align: center; + background: #5B6672; +} + +.search:hover { + background: #4484CA; +} + .search-results .desc { white-space: nowrap; text-overflow: ellipsis; @@ -350,18 +373,22 @@ h6.section-link:hover a:after { } /** Media Queries **/ - -@media (max-width: 700px) { +@media (max-width: 810px) { .sidebar { display: none; } - .content { - margin-left: 0px; + nav, .content { + margin: 0; + } + + .search-container { + width: 100%; } +} - nav.sub { - width: 85.5%; - margin: 0 auto; +@media (max-width: 1140px) { + .search-input { + width: 60%; } } \ No newline at end of file From abb61415be503d9ca8c3a812e685fcded8e1cef0 Mon Sep 17 00:00:00 2001 From: Daniel Fagnan Date: Thu, 20 Mar 2014 18:03:49 -0600 Subject: [PATCH 5/7] made changes to the font sizes. Now using rems Signed-off-by: Daniel Fagnan --- src/librustdoc/html/render.rs | 7 +- src/librustdoc/html/static/main.css | 198 +++++++++++++++++++--------- 2 files changed, 143 insertions(+), 62 deletions(-) diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 1ebb51cb65e9f..880a8da9cb7f1 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -885,6 +885,9 @@ impl<'a> fmt::Show for Item<'a> { None => {} } + // Write the breadcrumb trail header for the top + try!(write!(fmt.buf, "

")); + if self.cx.include_sources { let mut path = ~[]; clean_srcpath(self.item.source.filename.as_bytes(), |component| { @@ -898,15 +901,13 @@ impl<'a> fmt::Show for Item<'a> { try!(write!(fmt.buf, "\ - [src]", + view source", root = self.cx.root_path, krate = self.cx.layout.krate, path = path.connect("/"), href = href)); } - // Write the breadcrumb trail header for the top - try!(write!(fmt.buf, "

")); match self.item.inner { clean::ModuleItem(ref m) => if m.is_crate { try!(write!(fmt.buf, "Crate ")); diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css index ddfc2a67dd733..2e512484e2048 100644 --- a/src/librustdoc/html/static/main.css +++ b/src/librustdoc/html/static/main.css @@ -19,13 +19,27 @@ /* General structure and fonts */ +/** + * We start off with Richard Rutter's 62.5% number. This makes the default px size + * of text of 16px into 10px, which is much easier to work with regarding em units. + * + * Because em units are compounded (i.e., a child will compound it's text size up + * it's parent tree.), it becomes a little cumbersome when dealing with nested elements. + * + * "rem" units are rooted. Thus, they are only compounded by it's most root element; + * the `html` tag. + */ +html { + font-size: 62.5%; /** Base height of 10px **/ +} + body { color: #333; min-height: 100%; min-width: 500px; height: 100%; - font: 15px "Helvetica Neue", Helvetica, Arial, sans-serif; - line-height: 150%; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + line-height: 1.5; position: relative; height: auto; padding-bottom: 20px; @@ -33,31 +47,58 @@ body { h1, h2, h3, h4 { color: black; - font-weight: 500; + font-weight: 400; margin: 30px 0 20px 0; - padding-bottom: 15px; -} -h1.fqn { - border-bottom: 1px dashed #D5D5D5; - margin-top: 0; + line-height: 1.5; + padding-bottom: 4px; } -h2, h3, h4 { - border-bottom: 1px solid #DDDDDD; + +/** + * Normalize uses 2em, which is a compound unit. We're working with rem, root em, + * which is not compound. + */ +h1 { + font-size: 2rem; } -h2 code, h3 code, h4 code { - font-size: 1.2em; + +/** + * An `h2` is defaulted to 1.5em, but we're working with `rem`s. + */ +h2 { + font-size: 2rem; + line-height: 1.5; +} + +h1.fqn { + background: #F5F5F5; + border-radius: 9px; + height: 5.8rem; + line-height: 5.8rem; + font-size: 2.3rem; + padding-left: 20px; + color: #444; + text-transform: lowercase; + position: relative; } -code, pre { +h2, h3, h4 { border-bottom: 1px dashed #eee; } +h2 code, h3 code, h4 code { font-size: 1.3rem; } + +code, pre { font-family: "Inconsolata", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; } -pre { - font-size: 15px; + +p { + font-size: 1.5rem; + line-height: 1.7; } +pre { font-size: 16px; font-size: 1.6rem; } + nav.sub { padding-top: 10px; font-size: 16px; + font-size: 1.6rem; text-transform: uppercase; } @@ -74,17 +115,12 @@ nav.sub { /* Everything else */ .js-only, .hidden { display: none; } - -.sidebar { - padding: 10px; -} -.sidebar img { - margin: 20px auto; - display: block; -} +.sidebar { padding: 10px; } +.sidebar img { margin: 20px auto; display: block; } .sidebar .location { font-size: 17px; + font-size: 1.6rem; margin: 30px 0 20px 0; background: #e1e1e1; text-align: center; @@ -97,6 +133,7 @@ nav.sub { padding: 10px; margin-bottom: 10px; } + .block h2 { margin-top: 0; text-align: center; @@ -110,6 +147,7 @@ nav.sub { padding-left: 5px; padding-bottom: 6px; font-size: 14px; + font-size: 1.4rem; transition: border 500ms ease-out; } @@ -123,6 +161,7 @@ nav.sub { overflow: auto; padding-left: 0; } + .content pre.line-numbers { float: left; border: none; } .line-numbers span { color: #c67e2d; } .line-numbers .line-highlighted { @@ -134,6 +173,7 @@ nav.sub { color: #000 !important; background-color: #ccc; } + .content .highlighted a { color: #000 !important; } .content .highlighted.trait { background-color: #fece7e; } .content .highlighted.mod { background-color: #afc6e4; } @@ -147,6 +187,7 @@ nav.sub { white-space: nowrap; text-overflow: ellipsis; } + .docblock.short p { overflow: hidden; text-overflow: ellipsis; @@ -160,24 +201,35 @@ nav.sub { border-bottom: 1px solid #DDD; } -.docblock h1 { font-size: 1.3em; } -.docblock h2 { font-size: 1.15em; } -.docblock h3, .docblock h4, .docblock h5 { font-size: 1em; } +.docblock h1 { font-size: 2.5rem; } +.docblock h2 { font-size: 1.15rem; } +.docblock h3, .docblock h4, .docblock h5 { font-size: 1rem; } .content .source { - float: right; font-weight: 500; padding: 9px 15px; + font-size: 1.5rem; + position: absolute; + right: 10px; + display: inline-block; + height: 100%; + line-height: 2.5; +} + +.content .source:hover { + text-decoration: underline; } .content table { border-spacing: 0 5px; border-collapse: separate; + font-size: 1.3rem; } + .content td { vertical-align: top; } .content td:first-child { padding-right: 20px; } .content td p:first-child { margin-top: 0; } -.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; } +.content td h1, .content td h2 { margin-left: 0; font-size: 1.1rem; } .content .item-list { list-style-type: none; @@ -194,31 +246,33 @@ nav.sub { column-count: 5; column-gap: 2.5em; } + .content .multi-column li { width: 100%; display: inline-block; } -.content .method { font-size: 1em; } .content .methods { margin-left: 20px; } .content .methods .docblock { margin-left: 20px; } nav { - border-bottom: 1px solid #e0e0e0; - padding-bottom: 10px; margin-bottom: 10px; } + nav.main { padding: 20px 0; text-align: center; } + nav.main .current { border-top: 1px solid #000; border-bottom: 1px solid #000; } + nav.main .separator { border: 1px solid #000; display: inline-block; height: 23px; margin: 0 20px; } + nav.sum { text-align: right; } nav.sub form { display: inline; } @@ -232,12 +286,33 @@ a { background: transparent; } -.content a.trait, .block a.current.trait { color: #FFA000; } -.content a.mod, .block a.current.mod { color: #377BD8; } -.content a.enum, .block a.current.enum { color: #5ED66E; } -.content a.struct, .block a.current.struct { color: #e53700; } -.content a.fn, .block a.current.fn { color: #CE3D54; } -.content .fnname { color: #CE3D54; } +ul { + font-size: 1.5rem; + line-height: 1.9; +} + +.content a.trait, .block a.current.trait { color: #FFA000; font-size: 1.5rem; } +.content a.mod, .block a.current.mod { color: #377BD8; font-size: 1.5rem; } +.content a.enum, .block a.current.enum { color: #5ED66E; font-size: 1.5rem; } +.content a.ffi, .block a.ffi { font-size: 1.5rem; } +.content a.typedef, .block a.typedef { font-size: 1.5rem; } +.content a.struct, .block a.current.struct { color: #e53700; font-size: 1.5rem; } +.content a.fn, .block a.current.fn { color: #CE3D54; font-size: 1.5rem; } +.content .fnname { color: #CE3D54; font-size: 1.5rem; } + +h1.fqn a.mod, h1.fqn a.trait, h1.fqn a.enum, +h1.fqn a.struct, h1.fqn a.fn, h1.fqn a.ffi, h1.fqn a.typedef { + font-size: 2.3rem; +} + +.search-container { + width: 80%; + margin: 0 auto; + text-align: center; + border-bottom: 1px dashed #eee; + padding-bottom: 14px; + font-size: 1.6rem; +} .search-input { width: 100%; @@ -250,12 +325,11 @@ a { display: inline-block; border: 2px solid #e9e9e9; border-radius: 2px; - width: 75%; + width: 80%; box-sizing: content-box; color: #555; margin-top: 5px; - padding: 10px 16px; - font-size: 17px; + padding: 11px 16px; font-weight: 300; box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent; @@ -267,9 +341,8 @@ a { .search-input:focus { border-color: #66afe9; - border: 0; outline: 0; - box-shadow: 0 0 0 1px #078dd8, 0 0 0 2px #078dd8; + box-shadow: 0 0 0 1px #66afe9, 0 0 0 1px #66afe9; } .search { @@ -279,18 +352,22 @@ a { font-family: Helvetica Neue; font-weight: 200; color: #fff; - padding: 13px 25px; - border: 1px solid #343E49; + padding: 10px 10px; + border: 2px solid #e0e0e0; margin-top: 4px; - font-size: 16px; text-align: center; - background: #5B6672; + background: silver; + border-radius: 4px; } .search:hover { background: #4484CA; } +.search-results { + font-size: 1.4rem; +} + .search-results .desc { white-space: nowrap; text-overflow: ellipsis; @@ -323,6 +400,7 @@ a { display: block; margin-top: -1px; } + #help dd { margin: 5px 33px; } #help .infos { padding-left: 0; } #help h1 { margin-top: 0; } @@ -333,20 +411,20 @@ a { } .stability { - border-left: 6px solid #000; border-radius: 3px; padding: 8px 3px 8px 10px; - text-transform: lowercase; display: block; - margin-bottom: 20px; + margin-bottom: 10px; + font-size: 1.5rem; + color: #fff; } -.stability.Deprecated { border-color: #D60027; color: #880017; } -.stability.Experimental { border-color: #EC5315; color: #a53c0e; } -.stability.Unstable { border-color: #FFD700; color: #b39800; } -.stability.Stable { border-color: #AEC516; color: #7c8b10; } -.stability.Frozen { border-color: #009431; color: #007726; } -.stability.Locked { border-color: #0084B6; color: #00668c; } +.stability.Deprecated { background: #D60027; } +.stability.Experimental { background: #EC5315; } +.stability.Unstable { background: #FFD700; } +.stability.Stable { background: #AEC516; } +.stability.Frozen { background: #009431; } +.stability.Locked { background: #0084B6; } :target { background: #FDFFD3; } @@ -381,14 +459,16 @@ h6.section-link:hover a:after { nav, .content { margin: 0; } - - .search-container { - width: 100%; - } } @media (max-width: 1140px) { .search-input { width: 60%; } +} + +@media (max-width: 720px) { + .search-container { + width: 100%; + } } \ No newline at end of file From 8ebc2404747c9e86a7151555a4a001f031560f05 Mon Sep 17 00:00:00 2001 From: Daniel Fagnan Date: Thu, 20 Mar 2014 20:39:50 -0600 Subject: [PATCH 6/7] adjusted font size. Stability badges. Signed-off-by: Daniel Fagnan --- src/librustdoc/html/static/main.css | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css index 2e512484e2048..b78d22781ba2d 100644 --- a/src/librustdoc/html/static/main.css +++ b/src/librustdoc/html/static/main.css @@ -82,7 +82,7 @@ h1.fqn { } h2, h3, h4 { border-bottom: 1px dashed #eee; } -h2 code, h3 code, h4 code { font-size: 1.3rem; } +h2 code, h3 code, h4 code { font-size: 1.8rem; } code, pre { font-family: "Inconsolata", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; @@ -122,8 +122,9 @@ nav.sub { font-size: 17px; font-size: 1.6rem; margin: 30px 0 20px 0; - background: #e1e1e1; + background: #F5F5F5; text-align: center; + border-radius: 5px; color: #333; } @@ -202,8 +203,9 @@ nav.sub { } .docblock h1 { font-size: 2.5rem; } -.docblock h2 { font-size: 1.15rem; } -.docblock h3, .docblock h4, .docblock h5 { font-size: 1rem; } +.docblock h2 { font-size: 2rem; } +.docblock h3 { font-size: 1.8rem; } +.docblock h4, .docblock h5 { font-size: 1.4rem; } .content .source { font-weight: 500; From 7f0aa113c2160aaea1b62d034b537722d0b26fd7 Mon Sep 17 00:00:00 2001 From: Daniel Fagnan Date: Fri, 21 Mar 2014 19:29:09 -0600 Subject: [PATCH 7/7] fixed px in attribute Signed-off-by: Daniel Fagnan --- src/librustdoc/html/layout.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index 69c904d736bed..183b736c6f7cd 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -54,7 +54,7 @@ pub fn render(
{logo, select, none{} other{ - + }} {sidebar}