1
Fork 0

doc: design changes cleanups

Conflicts:
	src/librustdoc/html/layout.rs
This commit is contained in:
Adrien Tétar 2014-03-20 19:05:22 +01:00
parent 2d0962ad62
commit ea344fd18f
2 changed files with 42 additions and 115 deletions

View file

@ -33,9 +33,12 @@ r##"<!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="The {krate} library documentation.">
<title>{title}</title> <title>{title}</title>
<link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400,700' <link href='http://fonts.googleapis.com/css?family=Inconsolata:400,700'
rel='stylesheet' type='text/css'> rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="{root_path}main.css"> <link rel="stylesheet" type="text/css" href="{root_path}main.css">
@ -59,7 +62,6 @@ r##"<!DOCTYPE html>
<nav class="sub"> <nav class="sub">
<form class="search-form js-only"> <form class="search-form js-only">
<button class="do-search">Search</button>
<div class="search-container"> <div class="search-container">
<input class="search-input" name="search" <input class="search-input" name="search"
autocomplete="off" autocomplete="off"

View file

@ -20,54 +20,42 @@
/* General structure and fonts */ /* General structure and fonts */
body { body {
color: #333;
min-height: 100%; min-height: 100%;
min-width: 500px; min-width: 500px;
height: 100%; height: 100%;
font: 13px "Helvetica Neue", Helvetica, Arial, sans-serif; font: 15px "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 165%; line-height: 150%;
position: relative; position: relative;
height: auto; height: auto;
padding-bottom: 20px; padding-bottom: 20px;
} }
h1, h2, h3, h4 {
color: black;
font-weight: 500;
margin: 30px 0 20px 0;
padding-bottom: 15px;
}
h1.fqn {
border-bottom: 1px dashed #D5D5D5;
margin-top: 0;
}
h2, h3, h4 {
border-bottom: 1px solid #DDDDDD;
}
h2 code, h3 code, h4 code { h2 code, h3 code, h4 code {
text-transform: none;
font-size: 1.2em; 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 { code, pre {
color: #333; font-family: "Inconsolata", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
} }
pre { pre {
font-size: 15px; font-size: 15px;
} }
h1.fqn {
font-size: 26px;
font-weight: normal;
padding-bottom: 15px;
border-bottom: 1px dashed #D5D5D5;
}
nav {
font: 700 26px "Oswald", "Helvetica Neue", Helvetica, Arial, sans-serif;
text-transform: uppercase;
}
nav.sub { nav.sub {
padding-top: 10px; padding-top: 10px;
font-size: 16px; font-size: 16px;
@ -104,10 +92,6 @@ nav.sub {
color: #333; color: #333;
} }
.sidebar .location a {
color: #333;
}
.sidebar .block, pre { background: #fff; } .sidebar .block, pre { background: #fff; }
.block { .block {
@ -124,26 +108,14 @@ nav.sub {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
line-height: 15px; line-height: 15px;
margin: 0 0 0 45px; padding-left: 5px;
padding-bottom: 4px; padding-bottom: 6px;
border-bottom: 2px solid #fff;
font-size: 14px; font-size: 14px;
transition: border 500ms ease-out; transition: border 500ms ease-out;
} }
body p {
font-size: 15px;
line-height: 1.6;
}
.content { .content {
padding: 20px 20px 20px 40px; padding: 20px 40px;
}
.content h1 {
margin-top: 0;
font-weight: 400 !important;
} }
.content pre { padding: 20px; } .content pre { padding: 20px; }
@ -186,27 +158,17 @@ body p {
margin-left: 0; margin-left: 0;
margin: 40px 0 10px 0; margin: 40px 0 10px 0;
padding-bottom: 10px; padding-bottom: 10px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #DDD;
} }
.docblock h1 { font-size: 1.1em; } .docblock h1 { font-size: 1.3em; }
.docblock h2 { font-size: 1.05em; } .docblock h2 { font-size: 1.15em; }
.docblock h3, .docblock h4, .docblock h5 { font-size: 1em; } .docblock h3, .docblock h4, .docblock h5 { font-size: 1em; }
.docblock h3 {
font-size: 1.3em;
}
.docblock h2 {
font-size: 1.5em;
}
.content .source { .content .source {
float: right; float: right;
font-size: 14px; font-weight: 500;
font-weight: 400;
padding: 9px 15px; padding: 9px 15px;
color: #333;
} }
.content table { .content table {
@ -263,7 +225,6 @@ nav.sub form { display: inline; }
nav, .content { nav, .content {
margin-left: 220px; margin-left: 220px;
margin-right: 20px;
} }
a { a {
@ -272,8 +233,6 @@ a {
background: transparent; background: transparent;
} }
.content a, .block a.current { font-weight: 400; }
.content a.trait, .block a.current.trait { color: #ed9603; } .content a.trait, .block a.current.trait { color: #ed9603; }
.content a.mod, .block a.current.mod { color: #4d76ae; } .content a.mod, .block a.current.mod { color: #4d76ae; }
.content a.enum, .block a.current.enum { color: #5e9766; } .content a.enum, .block a.current.enum { color: #5e9766; }
@ -281,31 +240,22 @@ a {
.content a.fn, .block a.current.fn { color: #8c6067; } .content a.fn, .block a.current.fn { color: #8c6067; }
.content .fnname { color: #8c6067; } .content .fnname { color: #8c6067; }
.search-container {
width: 60%;
margin-left: 50px;
}
.search-input { .search-input {
border: 2px solid #e9e9e9; width: 100%;
border-radius: 2px; /* Override Normalize.css: we have margins and do
width: 95%; not want to overflow - the `moz` attribute is necessary
box-sizing: content-box; until Firefox 29, too early to drop at this point */
-moz-box-sizing: border-box !important;
box-sizing: border-box !important;
outline: none; outline: none;
border: none; border: none;
background-color: white;
font-family: "Helvetica Neue";
color: #000;
margin-top: 5px;
padding: 10px 20px;
font-weight: 300;
border-radius: 1px; border-radius: 1px;
box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent; color: #555;
color: #555555; margin-top: 5px;
padding: 10px 16px; padding: 10px 16px;
line-height: 1.4;
font-size: 17px; font-size: 17px;
font-weight: 300;
box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
transition: background-color 50ms linear; transition: background-color 50ms linear;
transition: border 500ms ease-out; transition: border 500ms ease-out;
transition: box-shadow 500ms ease-out; transition: box-shadow 500ms ease-out;
@ -318,21 +268,6 @@ a {
box-shadow: 0 0 0 1px #078dd8, 0 0 0 2px #078dd8; box-shadow: 0 0 0 1px #078dd8, 0 0 0 2px #078dd8;
} }
.do-search {
display: none;
outline: none;
border: none;
font-family: Helvetica Neue;
font-weight: 200;
color: #fff;
padding: 14px 25px;
margin-top: 3px;
font-size: 16px;
text-align: center;
background: #5B6672;
margin-left: 10px;
}
.search-results .desc { .search-results .desc {
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -377,11 +312,9 @@ a {
.stability { .stability {
border-left: 6px solid #000; border-left: 6px solid #000;
border-radius: 3px; border-radius: 3px;
padding: 8px 3px; padding: 8px 3px 8px 10px;
background: #fff;
text-transform: lowercase; text-transform: lowercase;
display: block; display: block;
padding-left: 10px;
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -418,14 +351,6 @@ h6.section-link:hover a:after {
/** Media Queries **/ /** Media Queries **/
@media (max-width: 620px) {
.search-container {
display: block;
width: 100%;
margin-left: 0px;
}
}
@media (max-width: 700px) { @media (max-width: 700px) {
.sidebar { .sidebar {
display: none; display: none;
@ -436,7 +361,7 @@ h6.section-link:hover a:after {
} }
nav.sub { nav.sub {
width: 80%; width: 85.5%;
margin: 0 auto; margin: 0 auto;
} }
} }