Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up rustdoc css #40278

Merged
merged 1 commit into from
Mar 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 6 additions & 27 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ h4 > code, h3 > code, .invisible > code {
.content .method .where,
.content .fn .where,
.content .where.fmt-newline {
display: block;
display: block;
}
/* Bit of whitespace to indent it */
.content .method .where::before,
.content .fn .where::before,
.content .where.fmt-newline::before {
content: ' ';
content: ' ';
}

.content .methods > div { margin-left: 40px; }
Expand Down Expand Up @@ -506,17 +506,15 @@ body.blur > :not(#help) {
}
#help > div {
flex: 0 0 auto;
background: #e9e9e9;
box-shadow: 0 0 6px rgba(0,0,0,.2);
width: 550px;
height: 330px;
border: 1px solid #bfbfbf;
border: 1px solid;
}
#help dt {
float: left;
border-radius: 4px;
border: 1px solid #bfbfbf;
background: #fff;
border: 1px solid;
width: 23px;
text-align: center;
clear: left;
Expand Down Expand Up @@ -567,7 +565,6 @@ body.blur > :not(#help) {
.since {
font-weight: normal;
font-size: initial;
color: grey;
position: absolute;
right: 0;
top: 0;
Expand All @@ -589,24 +586,12 @@ td.summary-column {
padding-right: 0px;
}

.line-numbers :target { background-color: transparent; }

/* Code highlighting */
pre.rust .kw { color: #8959A8; }
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
pre.rust .number, pre.rust .string { color: #718C00; }
pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val,
pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
pre.rust .lifetime { color: #B76514; }
pre.rust .question-mark {
color: #ff9011;
font-weight: bold;
}

pre.rust { position: relative; }
a.test-arrow {
background-color: rgba(78, 139, 202, 0.2);
display: inline-block;
position: absolute;
padding: 5px 10px 5px 10px;
Expand All @@ -616,7 +601,6 @@ a.test-arrow {
right: 5px;
}
a.test-arrow:hover{
background-color: #4e8bca;
text-decoration: none;
}

Expand Down Expand Up @@ -660,10 +644,6 @@ a.test-arrow:hover{
text-align: center;
}

.toggle-label {
color: #999;
}

.ghost {
display: none;
}
Expand Down Expand Up @@ -719,8 +699,7 @@ span.since {
}

:target > code {
background: #FDFFD3;
opacity: 1;
opacity: 1;
}

/* Media Queries */
Expand Down Expand Up @@ -793,4 +772,4 @@ span.since {
nav.sub, .content .out-of-band, .collapse-toggle {
display: none;
}
}
}
114 changes: 83 additions & 31 deletions src/librustdoc/html/static/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,36 @@
/* General structure and fonts */

body {
background-color: white;
color: black;
background-color: white;
color: black;
}

h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
color: black;
color: black;
}
h1.fqn {
border-bottom-color: #D5D5D5;
border-bottom-color: #D5D5D5;
}
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
border-bottom-color: #DDDDDD;
border-bottom-color: #DDDDDD;
}
.in-band {
background-color: white;
background-color: white;
}

.docblock code, .docblock-short code {
background-color: #F5F5F5;
background-color: #F5F5F5;
}
pre {
background-color: #F5F5F5;
background-color: #F5F5F5;
}

.sidebar {
background-color: #F1F1F1;
}

.sidebar .current {
background-color: #fff;
}

.sidebar {
Expand All @@ -46,24 +54,24 @@ pre {
}

.sidebar .location {
border-color: #000;
background-color: #fff;
color: #333;
border-color: #000;
background-color: #fff;
color: #333;
}

.block a:hover {
background: #F5F5F5;
background: #F5F5F5;
}

.line-numbers span { color: #c67e2d; }
.line-numbers .line-highlighted {
background-color: #f6fdb0 !important;
background-color: #f6fdb0 !important;
}

:target { background: #FDFFD3; }
.content .highlighted {
color: #000 !important;
background-color: #ccc;
color: #000 !important;
background-color: #ccc;
}
.content .highlighted a, .content .highlighted span { color: #000 !important; }
.content .highlighted.trait { background-color: #fece7e; }
Expand All @@ -76,21 +84,21 @@ pre {
.content .highlighted.type { background-color: #c6afb3; }

.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
border-bottom-color: #DDD;
border-bottom-color: #DDD;
}

.docblock table {
border-color: #ddd;
border-color: #ddd;
}

.docblock table td {
border-top-color: #ddd;
border-bottom-color: #ddd;
border-top-color: #ddd;
border-bottom-color: #ddd;
}

.docblock table th {
border-top-color: #ddd;
border-bottom-color: #ddd;
border-top-color: #ddd;
border-bottom-color: #ddd;
}

.content span.primitive, .content a.primitive, .block a.current.primitive { color: #39a7bf; }
Expand All @@ -105,34 +113,78 @@ pre.rust .comment { color: #8E908C; }
pre.rust .doccomment { color: #4D4D4C; }

nav {
border-bottom-color: #e0e0e0;
border-bottom-color: #e0e0e0;
}
nav.main .current {
border-top-color: #000;
border-bottom-color: #000;
border-top-color: #000;
border-bottom-color: #000;
}
nav.main .separator {
border: 1px solid #000;
border: 1px solid #000;
}
a {
color: #000;
color: #000;
}

.docblock a, .docblock-short a, .stability a {
color: #3873AD;
color: #3873AD;
}

a.test-arrow {
color: #f5f5f5;
color: #f5f5f5;
}

.content span.trait, .content a.trait, .block a.current.trait { color: #7c5af3; }

.search-input {
color: #555;
box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
background-color: white;
color: #555;
box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
background-color: white;
}

.stab.unstable { background: #FFF5D6; border-color: #FFC600; }
.stab.deprecated { background: #F3DFFF; border-color: #7F0087; }

#help > div {
background: #e9e9e9;
border-color: #bfbfbf;;
}

#help dt {
border-color: #bfbfbf;
background: #fff;
}

.since {
color: grey;
}

.line-numbers :target { background-color: transparent; }

/* Code highlighting */
pre.rust .kw { color: #8959A8; }
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
pre.rust .number, pre.rust .string { color: #718C00; }
pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val,
pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
pre.rust .lifetime { color: #B76514; }
pre.rust .question-mark {
color: #ff9011;
}

a.test-arrow {
background-color: rgba(78, 139, 202, 0.2);
}

a.test-arrow:hover{
background-color: #4e8bca;
}

.toggle-label {
color: #999;
}

:target > code {
background: #FDFFD3;
}