Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
c54895be
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c54895be
编写于
7月 05, 2021
作者:
B
bors
浏览文件
操作
浏览文件
下载
差异文件
Auto merge of #86663 - fee1-dead:use-rustdoc-css, r=GuillaumeGomez
Use rustdoc.css for error index Closes #86512.
上级
09d9b608
5072a47f
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
19 addition
and
137 deletion
+19
-137
src/bootstrap/doc.rs
src/bootstrap/doc.rs
+8
-2
src/doc/rust.css
src/doc/rust.css
+8
-132
src/librustdoc/html/static/themes/light.css
src/librustdoc/html/static/themes/light.css
+2
-3
src/tools/error_index_generator/main.rs
src/tools/error_index_generator/main.rs
+1
-0
未找到文件。
src/bootstrap/doc.rs
浏览文件 @
c54895be
...
...
@@ -374,9 +374,15 @@ fn run(self, builder: &Builder<'_>) {
}
if
filename
==
"not_found.md"
{
cmd
.arg
(
"--markdown-css"
)
.arg
(
"https://doc.rust-lang.org/rust.css"
);
cmd
.arg
(
"--markdown-css"
)
.arg
(
format!
(
"https://doc.rust-lang.org/rustdoc{}.css"
,
&
builder
.version
))
.arg
(
"--markdown-css"
)
.arg
(
"https://doc.rust-lang.org/rust.css"
);
}
else
{
cmd
.arg
(
"--markdown-css"
)
.arg
(
"rust.css"
);
cmd
.arg
(
"--markdown-css"
)
.arg
(
format!
(
"rustdoc{}.css"
,
&
builder
.version
))
.arg
(
"--markdown-css"
)
.arg
(
"rust.css"
);
}
builder
.run
(
&
mut
cmd
);
}
...
...
src/doc/rust.css
浏览文件 @
c54895be
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
@font-face
{
font-family
:
'Fira Sans'
;
font-style
:
normal
;
font-weight
:
400
;
src
:
local
(
'Fira Sans'
),
url("FiraSans-Regular.woff2")
format
(
"woff2"
),
url("FiraSans-Regular.woff")
format
(
'woff'
);
font-display
:
swap
;
}
@font-face
{
font-family
:
'Fira Sans'
;
font-style
:
normal
;
font-weight
:
500
;
src
:
local
(
'Fira Sans Medium'
),
url("FiraSans-Medium.woff2")
format
(
"woff2"
),
url("FiraSans-Medium.woff")
format
(
'woff'
);
font-display
:
swap
;
}
/* See SourceSerif4-LICENSE.md for the Source Serif 4 license. */
@font-face
{
font-family
:
'Source Serif 4'
;
font-style
:
normal
;
font-weight
:
400
;
src
:
local
(
'Source Serif 4'
),
url("SourceSerif4-Regular.ttf.woff")
format
(
'woff'
);
font-display
:
swap
;
}
@font-face
{
font-family
:
'Source Serif 4'
;
font-style
:
italic
;
font-weight
:
400
;
src
:
local
(
'Source Serif 4 Italic'
),
url("SourceSerif4-It.ttf.woff")
format
(
'woff'
);
font-display
:
swap
;
}
@font-face
{
font-family
:
'Source Serif 4'
;
font-style
:
normal
;
font-weight
:
700
;
src
:
local
(
'Source Serif 4 Bold'
),
url("SourceSerif4-Bold.ttf.woff")
format
(
'woff'
);
font-display
:
swap
;
}
/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
@font-face
{
font-family
:
'Source Code Pro'
;
font-style
:
normal
;
font-weight
:
400
;
/* Avoid using locally installed font because bad versions are in circulation:
* see https://github.com/rust-lang/rust/issues/24355 */
src
:
url("SourceCodePro-Regular.ttf.woff")
format
(
'woff'
);
font-display
:
swap
;
}
@font-face
{
font-family
:
'Source Code Pro'
;
font-style
:
italic
;
font-weight
:
400
;
src
:
url("SourceCodePro-It.ttf.woff")
format
(
'woff'
);
font-display
:
swap
;
}
@font-face
{
font-family
:
'Source Code Pro'
;
font-style
:
normal
;
font-weight
:
600
;
src
:
url("SourceCodePro-Semibold.ttf.woff")
format
(
'woff'
);
font-display
:
swap
;
}
*
:not
(
body
)
{
-webkit-box-sizing
:
border-box
;
-moz-box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
/* General structure */
body
{
background-color
:
white
;
margin
:
0
auto
;
padding
:
0
15px
;
font-family
:
"Source Serif 4"
,
Georgia
,
Times
,
"Times New Roman"
,
serif
;
font-size
:
18px
;
color
:
#333
;
line-height
:
1.428571429
;
-webkit-
font-feature-settings
:
"kern"
,
"liga"
;
-moz-
font-feature-settings
:
"kern"
,
"liga"
;
font-feature-settings
:
"kern"
,
"liga"
;
-webkit-
box-sizing
:
unset
;
-moz-
box-sizing
:
unset
;
box-sizing
:
unset
;
}
@media
(
min-width
:
768px
)
{
body
{
...
...
@@ -93,11 +17,7 @@ body {
}
}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
nav
,
#versioninfo
{
font-family
:
"Fira Sans"
,
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
color
:
black
;
h2
,
h3
,
h4
,
h5
,
h6
{
font-weight
:
400
;
line-height
:
1.1
;
}
...
...
@@ -107,6 +27,7 @@ h1, h2, h3 {
}
h1
{
margin-bottom
:
20px
;
line-height
:
1.1
;
}
h4
,
h5
,
h6
{
margin-top
:
12px
;
...
...
@@ -114,6 +35,7 @@ h4, h5, h6 {
padding
:
5px
10px
;
}
h5
,
h6
{
color
:
black
;
text-decoration
:
underline
;
}
...
...
@@ -138,6 +60,7 @@ h3 {
}
h4
{
font-size
:
22px
;
border-bottom
:
none
;
}
h5
{
font-size
:
20px
;
...
...
@@ -208,19 +131,15 @@ a:hover, a:active {
h1
a
:link
,
h1
a
:visited
,
h2
a
:link
,
h2
a
:visited
,
h3
a
:link
,
h3
a
:visited
,
h4
a
:link
,
h4
a
:visited
,
h5
a
:link
,
h5
a
:visited
{
color
:
black
;}
h1
a
:hover
,
h2
a
:hover
,
h3
a
:hover
,
h4
a
:hover
,
h5
a
:hover
{
text-decoration
:
none
;}
/* Code */
pre
,
code
{
font-family
:
"Source Code Pro"
,
Menlo
,
Monaco
,
Consolas
,
"DejaVu Sans Mono"
,
monospace
;
word-wrap
:
break-word
;
}
pre
{
border-left
:
2px
solid
#eee
;
white-space
:
pre-wrap
;
padding
:
14px
;
padding-right
:
0
;
margin
:
20px
0
;
font-size
:
15px
;
...
...
@@ -244,19 +163,6 @@ a > code {
color
:
#8D1A38
;
}
/* 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
.comment
{
color
:
#8E908C
;
}
pre
.rust
.doccomment
{
color
:
#4D4D4C
;
}
pre
.rust
.macro
,
pre
.rust
.macro-nonterminal
{
color
:
#3E999F
;
}
pre
.rust
.lifetime
{
color
:
#B76514
;
}
/* The rest */
#versioninfo
{
text-align
:
center
;
margin
:
0.5em
;
...
...
@@ -298,9 +204,6 @@ blockquote p:last-child {
margin-bottom
:
0
;
}
ul
,
ol
{
padding-left
:
25px
;
}
ul
ul
,
ol
ul
,
ul
ol
,
ol
ol
{
margin-bottom
:
0
;
}
...
...
@@ -355,22 +258,8 @@ table th {
/* Code snippets */
.example-wrap
{
position
:
relative
;
}
pre
.rust
{
position
:
relative
;
}
a
.test-arrow
{
background-color
:
rgba
(
78
,
139
,
202
,
0.2
);
display
:
inline-block
;
position
:
absolute
;
color
:
#f5f5f5
;
padding
:
5px
10px
5px
10px
;
border-radius
:
5px
;
font-size
:
130%
;
top
:
5px
;
right
:
5px
;
}
a
.test-arrow
:hover
{
background-color
:
#4e8bca
;
text-decoration
:
none
;
color
:
#f5f5f5
}
.unstable-feature
{
...
...
@@ -439,19 +328,6 @@ a.test-arrow:hover{
position
:
relative
;
}
.information
{
position
:
absolute
;
left
:
-25px
;
margin-top
:
7px
;
z-index
:
1
;
}
.tooltip
{
position
:
relative
;
display
:
inline-block
;
cursor
:
pointer
;
}
.tooltip
.tooltiptext
{
width
:
120px
;
display
:
none
;
...
...
src/librustdoc/html/static/themes/light.css
浏览文件 @
c54895be
...
...
@@ -159,9 +159,6 @@ a.result-keyword:focus { background-color: #f99650; }
.content
.fnname
{
color
:
#9a6e31
;
}
.content
span
.keyword
,
.content
a
.keyword
,
.block
a
.current.keyword
{
color
:
#de5249
;
}
pre
.rust
.comment
{
color
:
#8E908C
;
}
pre
.rust
.doccomment
{
color
:
#4D4D4C
;
}
nav
:not
(
.sidebar
)
{
border-bottom-color
:
#e0e0e0
;
}
...
...
@@ -252,6 +249,8 @@ 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
.comment
{
color
:
#8E908C
;
}
pre
.rust
.doccomment
{
color
:
#4D4D4C
;
}
pre
.rust
.macro
,
pre
.rust
.macro-nonterminal
{
color
:
#3E999F
;
}
pre
.rust
.lifetime
{
color
:
#B76514
;
}
pre
.rust
.question-mark
{
...
...
src/tools/error_index_generator/main.rs
浏览文件 @
c54895be
...
...
@@ -67,6 +67,7 @@ fn header(&self, output: &mut dyn Write) -> Result<(), Box<dyn Error>> {
<title>Rust Compiler Error Index</title>
<meta charset="utf-8">
<!-- Include rust.css after light.css so its rules take priority. -->
<link rel="stylesheet" type="text/css" href="rustdoc{suffix}.css"/>
<link rel="stylesheet" type="text/css" href="light{suffix}.css"/>
<link rel="stylesheet" type="text/css" href="rust.css"/>
<style>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录