Skip to content

Commit 394207a

Browse files
rwakulszowadavidbarsky
authored andcommitted
docs: fix warning styles in html-in-header (#2449)
The documentation under https://tracing.rs/tracing/ is missing CSS styles. Fixes #2444 Used the `--html-in-header` rustdoc flag instead of `--extend-css`. Converted the css file into an html file.
1 parent cbcfbf9 commit 394207a

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

assets/warning-css.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<style>
2+
#tracing-warning-header {
3+
z-index: 400;
4+
position: fixed;
5+
background-color: orange;
6+
left: 0;
7+
top: 0;
8+
right: 0;
9+
height: 50px;
10+
display: block;
11+
color: black;
12+
font-size-adjust: 0.55;
13+
line-height: 0.6;
14+
padding-top: 10px;
15+
padding-left: 230px;
16+
}
17+
18+
body {
19+
/* add top padding to fit the warning header */
20+
padding-top: 50px !important;
21+
}
22+
23+
.sidebar {
24+
/* add top padding to fit the warning header */
25+
margin-top: 50px !important;
26+
}
27+
</style>

netlify.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
--force-warn renamed-and-removed-lints \
1212
--cfg docsrs \
1313
--cfg tracing_unstable
14+
--html-before-content /opt/build/repo/assets/warning.html \
15+
--html-in-header /opt/build/repo/assets/noindex.html \
16+
--html-in-header /opt/build/repo/assets/warning-css.html \
1417
"""
1518
RUSTFLAGS="--cfg tracing_unstable"
1619

0 commit comments

Comments
 (0)