Skip to content

Commit 061c3fe

Browse files
GuillaumeGomezJoshua Nelson
authored and
Joshua Nelson
committed
Remove rustdoc CSS files import from non-rustdoc pages
1 parent be481c9 commit 061c3fe

File tree

2 files changed

+102
-3
lines changed

2 files changed

+102
-3
lines changed

templates/base.html

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
{# Docs.rs styles #}
1313
<link rel="stylesheet" href="/-/static/vendored.css?{{ docsrs_version() | slugify }}" type="text/css" media="all" />
1414
<link rel="stylesheet" href="/normalize-{{ rustc_resource_suffix() }}.css" type="text/css" media="all" />
15-
<link rel="stylesheet" href="/rustdoc-{{ rustc_resource_suffix() }}.css" type="text/css" media="all" />
16-
<link rel="stylesheet" href="/light-{{ rustc_resource_suffix() }}.css" type="text/css" media="all" />
1715
<link rel="stylesheet" href="/-/static/style.css?{{ docsrs_version() | slugify }}" type="text/css" media="all" />
1816

1917
{%- block css -%}{%- endblock css -%}

templates/style/base.scss

+102-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,56 @@
11
// FIXME: Use modules
22
@import "vars", "utils", "navbar", "themes", "fa";
33

4+
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
5+
@font-face {
6+
font-family: 'Fira Sans';
7+
font-style: normal;
8+
font-weight: 400;
9+
src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
10+
}
11+
@font-face {
12+
font-family: 'Fira Sans';
13+
font-style: normal;
14+
font-weight: 500;
15+
src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
16+
}
17+
18+
/* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license. */
19+
@font-face {
20+
font-family: 'Source Serif Pro';
21+
font-style: normal;
22+
font-weight: 400;
23+
src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff');
24+
}
25+
@font-face {
26+
font-family: 'Source Serif Pro';
27+
font-style: italic;
28+
font-weight: 400;
29+
src: local('Source Serif Pro Italic'), url("SourceSerifPro-It.ttf.woff") format('woff');
30+
}
31+
@font-face {
32+
font-family: 'Source Serif Pro';
33+
font-style: normal;
34+
font-weight: 700;
35+
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff');
36+
}
37+
38+
/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
39+
@font-face {
40+
font-family: 'Source Code Pro';
41+
font-style: normal;
42+
font-weight: 400;
43+
/* Avoid using locally installed font because bad versions are in circulation:
44+
* see https://github.com/rust-lang/rust/issues/24355 */
45+
src: url("SourceCodePro-Regular.woff") format('woff');
46+
}
47+
@font-face {
48+
font-family: 'Source Code Pro';
49+
font-style: normal;
50+
font-weight: 600;
51+
src: url("SourceCodePro-Semibold.woff") format('woff');
52+
}
53+
454
html,
555
input,
656
select,
@@ -25,12 +75,62 @@ body {
2575
padding: 0;
2676
margin: 0;
2777

78+
* {
79+
-webkit-box-sizing: border-box;
80+
-moz-box-sizing: border-box;
81+
box-sizing: border-box;
82+
}
83+
84+
h1 {
85+
font-size: 1.5em;
86+
}
87+
h3 {
88+
font-size: 1.3em;
89+
}
90+
h1, h2, h3, h4 {
91+
font-family: "Fira Sans",sans-serif;
92+
font-weight: 500;
93+
margin: 20px 0 15px 0;
94+
padding-bottom: 6px;
95+
}
96+
h2, h3, h4 {
97+
border-bottom: 1px solid;
98+
}
99+
pre {
100+
background-color: #F5F5F5;
101+
padding: 14px;
102+
}
103+
code, kbd, pre, samp {
104+
font-family: "Source Code Pro",monospace;
105+
}
106+
a {
107+
text-decoration: none;
108+
background: transparent;
109+
}
110+
p {
111+
margin: 0 0 .6em 0;
112+
}
113+
ol, ul {
114+
padding-left: 25px;
115+
}
116+
28117
input, #search {
29118
background-color: var(--color-background-input);
30119
color: var(--input-color);
120+
line-height: normal;
31121
}
32122

33123
#search {
124+
-moz-box-sizing: border-box !important;
125+
box-sizing: border-box !important;
126+
outline: none;
127+
border: none;
128+
border-radius: 1px;
129+
margin-top: 5px;
130+
padding: 10px 16px;
131+
font-size: 17px;
132+
width: 100%;
133+
34134
box-shadow: 0 0 0 1px var(--color-border), 0 0 0 1px var(--color-border);
35135
transition: box-shadow 150ms ease-in-out;
36136
}
@@ -89,7 +189,8 @@ div.landing {
89189

90190
h1.brand {
91191
font-size: 3em;
92-
margin-bottom: 10px;
192+
margin: 20px 0 10px 0;
193+
padding-bottom: 6px;
93194
color: var(--color-brand);
94195
}
95196

0 commit comments

Comments
 (0)