You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustdoc styling issue: .docblock occasionally has problematic right padding #86184
In tracing, we use warnings blocks to surface potential gotchas to users (this is arguably a misuse of blocks in rustdoc, but anyways...). Unforuntately, I noticed that blocks add 1ex of right padding to anything rendered as code, including inline comments. Here's an example: https://deploy-preview-1430--tracing-rs.netlify.app/tracing/struct.span#method.entered. A screenshot is below for posterity.
The extra right padding results in a poor reading experience while reading some of tracing's documentation. While I recognize that we're misusing docblocks to render tooltips and#83550 attempted to solve this problem in more well-trodden use-cases, I was hoping that this rendering issue could either be fixed or we can be given a decently stable workaround. Thanks!
A fix isn't really strictly necessary. If we can provide custom CSS to rustdoc and docs.rs where we override .docblock with a tracing-specific selector (or a similar, tracing-scoped approach), that'd also be a great resolution.
If we can provide custom CSS to rustdoc and docs.rs where we override .docblock with a tracing-specific selector (or a similar, tracing-scoped approach), that'd also be a great resolution.
Activity
jyn514 commentedon Jun 9, 2021
I agree this is not super supported ... cc @jsha in case you want to take a look, but I'm not sure we want to fix it.
davidbarsky commentedon Jun 10, 2021
A fix isn't really strictly necessary. If we can provide custom CSS to rustdoc and docs.rs where we override
.docblockwith a tracing-specific selector (or a similar, tracing-scoped approach), that'd also be a great resolution.GuillaumeGomez commentedon Jul 23, 2021
I think it's somewhat related to #79677.
jyn514 commentedon Jul 23, 2021
@davidbarsky Missed this before sorry - this is already stable: https://doc.rust-lang.org/stable/rustdoc/command-line-arguments.html#-e--extend-css-extend-rustdocs-css
jyn514 commentedon Aug 16, 2021
I'm going to close this since there's a stable workaround.