Skip to content

Commit 0dd5efa

Browse files
committed
---
yaml --- r: 151126 b: refs/heads/try2 c: b3577a1 h: refs/heads/master v: v3
1 parent 8f3b856 commit 0dd5efa

File tree

4 files changed

+31
-37
lines changed

4 files changed

+31
-37
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: c9d995d384f795af96bd4a435539656c97eecdc6
8+
refs/heads/try2: b3577a10f35ef237e2cad7cc3f1947d2218f0ee4
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/doc/rust.css

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
src: local('Heuristica Bold'), url("Heuristica-Bold.woff") format('woff');
4242
}
4343

44-
* {
44+
*:not(body) {
4545
-webkit-box-sizing: border-box;
4646
-moz-box-sizing: border-box;
4747
box-sizing: border-box;
@@ -78,16 +78,6 @@ h1, h2, h3 {
7878
h1 {
7979
margin-bottom: 20px;
8080
}
81-
@media (min-width: 1170px) {
82-
h1 {
83-
margin-top: 40px;
84-
margin-bottom: 30px;
85-
}
86-
h1, h2, h3 {
87-
margin-top: 30px;
88-
margin-bottom: 15px;
89-
}
90-
}
9181
h4, h5, h6 {
9282
margin-top: 12px;
9383
margin-bottom: 10px;
@@ -197,7 +187,6 @@ pre, code {
197187
}
198188
pre {
199189
border-left: 2px solid #eee;
200-
border-radius: 0;
201190
white-space: pre-wrap;
202191
padding: 14px;
203192
padding-right: 0;
@@ -209,14 +198,12 @@ pre {
209198
code {
210199
padding: 0 2px;
211200
color: #8D1A38;
212-
white-space: nowrap;
201+
white-space: pre-wrap;
213202
}
214203
pre code {
215204
padding: 0;
216205
font-size: inherit;
217206
color: inherit;
218-
white-space: pre-wrap;
219-
background-color: transparent;
220207
}
221208

222209
/* Code highlighting */
@@ -237,7 +224,7 @@ pre.rust .lifetime { color: #B76514; }
237224
margin: 0.5em;
238225
font-size: 1.1em;
239226
}
240-
@media (min-width: 768px) {
227+
@media (min-width: 992px) {
241228
#versioninfo {
242229
font-size: 0.8em;
243230
position: fixed;
@@ -248,7 +235,7 @@ pre.rust .lifetime { color: #B76514; }
248235
background-color: #fff;
249236
margin: 2px;
250237
padding: 0 2px;
251-
border-radius: .3em;
238+
border-radius: .2em;
252239
}
253240
}
254241
#versioninfo a.hash {

branches/try2/src/librustdoc/html/render.rs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -924,19 +924,6 @@ impl<'a> Item<'a> {
924924

925925
impl<'a> fmt::Show for Item<'a> {
926926
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
927-
match attr::find_stability(self.item.attrs.iter()) {
928-
Some(ref stability) => {
929-
try!(write!(fmt.buf,
930-
"<a class='stability {lvl}' title='{reason}'>{lvl}</a>",
931-
lvl = stability.level.to_str(),
932-
reason = match stability.text {
933-
Some(ref s) => (*s).clone(),
934-
None => InternedString::new(""),
935-
}));
936-
}
937-
None => {}
938-
}
939-
940927
// Write the breadcrumb trail header for the top
941928
try!(write!(fmt.buf, "\n<h1 class='fqn'>"));
942929
match self.item.inner {
@@ -964,6 +951,21 @@ impl<'a> fmt::Show for Item<'a> {
964951
try!(write!(fmt.buf, "<a class='{}' href=''>{}</a>",
965952
shortty(self.item), self.item.name.get_ref().as_slice()));
966953

954+
// Write stability attributes
955+
match attr::find_stability(self.item.attrs.iter()) {
956+
Some(ref stability) => {
957+
try!(write!(fmt.buf,
958+
"<a class='stability {lvl}' title='{reason}'>{lvl}</a>",
959+
lvl = stability.level.to_str(),
960+
reason = match stability.text {
961+
Some(ref s) => (*s).clone(),
962+
None => InternedString::new(""),
963+
}));
964+
}
965+
None => {}
966+
}
967+
968+
// Write `src` tag
967969
if self.cx.include_sources {
968970
let mut path = Vec::new();
969971
clean_srcpath(self.item.source.filename.as_bytes(), |component| {

branches/try2/src/librustdoc/html/static/main.css

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,18 @@ p {
9898

9999
code, pre {
100100
font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
101+
white-space: pre-wrap;
101102
}
102103
pre {
103104
font-size: 15px;
105+
padding: 14px;
106+
padding-right: 0;
107+
border-left: 2px solid #eee;
108+
}
109+
110+
.source pre {
111+
border-left: none;
112+
padding: 20px;
104113
}
105114

106115
nav.sub {
@@ -164,7 +173,6 @@ nav.sub {
164173
padding: 20px 0;
165174
}
166175

167-
.content pre { padding: 14px; }
168176
.content.source pre.rust {
169177
white-space: pre;
170178
overflow: auto;
@@ -355,10 +363,9 @@ a {
355363
.stability {
356364
border-left: 6px solid #000;
357365
border-radius: 3px;
358-
padding: 8px 3px 8px 10px;
366+
padding: 2px 10px;
359367
text-transform: lowercase;
360-
display: block;
361-
margin-bottom: 20px;
368+
margin-left: 10px;
362369
}
363370

364371
.stability.Deprecated { border-color: #D60027; color: #880017; }
@@ -370,8 +377,6 @@ a {
370377

371378
:target { background: #FDFFD3; }
372379

373-
pre.rust, pre.line-numbers { background-color: #F5F5F5; }
374-
375380
/* Code highlighting */
376381
pre.rust .kw { color: #8959A8; }
377382
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }

0 commit comments

Comments
 (0)