From 5dccb4e932e6b8cf50189613b1b30faa343e383e Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Fri, 5 Mar 2021 17:58:18 +0100 Subject: [PATCH] rustdoc: CSS: show the `
` "triangle" in all cases Currently we use `
` and `` for the unstable info box, under class `.stab`. However, they can also be useful to add detailed documentation like lengthy detailed examples that would be too much to show by default, e.g.: ///
Time-threads diagram /// /// ```text /// // Thread 1 | // Thread 2 /// let _rg = lock.read(); | /// | // will block /// | let _wg = lock.write(); /// // may deadlock | /// let _rg = lock.read(); | /// ``` ///
See https://github.com/rust-lang/rust/pull/82624 for an example where we could use this functionality. Signed-off-by: Miguel Ojeda --- src/librustdoc/html/static/rustdoc.css | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index e3d63fa2308e2..2247c887e2361 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -148,6 +148,7 @@ p { } summary { + display: list-item; outline: none; } @@ -834,10 +835,6 @@ body.blur > :not(#help) { display: inline; } -.stab summary { - display: list-item; -} - .stab .emoji { font-size: 1.5em; }