docs: fix warning styles in html-in-header (#2449)

## Motivation

The documentation under https://tracing.rs/tracing/ is missing CSS
styles. Fixes #2444 

## Solution

Used the `--html-in-header` rustdoc flag instead of `--extend-css`.
Converted the css file into an html file.
This commit is contained in:
rwa
2023-02-08 19:25:22 +01:00
committed by GitHub
parent 264a417b4b
commit 2ace0b56c1
2 changed files with 9 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
#tracing-warning-header { <style>
#tracing-warning-header {
z-index: 400; z-index: 400;
position: fixed; position: fixed;
background-color: orange; background-color: orange;
@@ -12,14 +13,15 @@
line-height: 0.6; line-height: 0.6;
padding-top: 10px; padding-top: 10px;
padding-left: 230px; padding-left: 230px;
} }
body { body {
/* add top padding to fit the warning header */ /* add top padding to fit the warning header */
padding-top: 50px !important; padding-top: 50px !important;
} }
.sidebar { .sidebar {
/* add top padding to fit the warning header */ /* add top padding to fit the warning header */
margin-top: 50px !important; margin-top: 50px !important;
} }
</style>

View File

@@ -12,7 +12,7 @@
--cfg docsrs \ --cfg docsrs \
--html-before-content /opt/build/repo/assets/warning.html \ --html-before-content /opt/build/repo/assets/warning.html \
--html-in-header /opt/build/repo/assets/noindex.html \ --html-in-header /opt/build/repo/assets/noindex.html \
--extend-css /opt/build/repo/assets/warning.css \ --html-in-header /opt/build/repo/assets/warning-css.html \
""" """
[[redirects]] [[redirects]]