Skip to content

Commit 304afd9

Browse files
Remove rustdoc CSS files import from non-rustdoc pages
1 parent 0f42199 commit 304afd9

File tree

2 files changed

+108
-3
lines changed

2 files changed

+108
-3
lines changed

templates/base.html

Lines changed: 0 additions & 2 deletions
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

Lines changed: 108 additions & 1 deletion
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,68 @@ 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+
h1, h2, h3, h4 {
88+
font-family: "Fira Sans",sans-serif;
89+
}
90+
h1, h2,
91+
h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),
92+
h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
93+
font-weight: 500;
94+
margin: 20px 0 15px 0;
95+
padding-bottom: 6px;
96+
}
97+
h2,
98+
h3:not(.impl):not(.method):not(.type):not(.tymethod),
99+
h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
100+
border-bottom: 1px solid;
101+
}
102+
h3 {
103+
font-size: 1.3em;
104+
}
105+
pre {
106+
background-color: #F5F5F5;
107+
padding: 14px;
108+
}
109+
code, kbd, pre, samp {
110+
font-family: "Source Code Pro",monospace;
111+
}
112+
a {
113+
text-decoration: none;
114+
background: transparent;
115+
}
116+
p {
117+
margin: 0 0 .6em 0;
118+
}
119+
ol, ul {
120+
padding-left: 25px;
121+
}
122+
28123
input, #search {
29124
background-color: var(--color-background-input);
30125
color: var(--input-color);
126+
line-height: normal;
31127
}
32128

33129
#search {
130+
-moz-box-sizing: border-box !important;
131+
box-sizing: border-box !important;
132+
outline: none;
133+
border: none;
134+
border-radius: 1px;
135+
margin-top: 5px;
136+
padding: 10px 16px;
137+
font-size: 17px;
138+
width: 100%;
139+
34140
box-shadow: 0 0 0 1px var(--color-border), 0 0 0 1px var(--color-border);
35141
transition: box-shadow 150ms ease-in-out;
36142
}
@@ -89,7 +195,8 @@ div.landing {
89195

90196
h1.brand {
91197
font-size: 3em;
92-
margin-bottom: 10px;
198+
margin: 20px 0 10px 0;
199+
padding-bottom: 6px;
93200
color: var(--color-brand);
94201
}
95202

0 commit comments

Comments
 (0)