diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 1898f5feed2cd..84c5b5dd60466 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -527,7 +527,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { }; let sidebar = if let Some(ref version) = self.cache.crate_version { format!( - "

Crate {}

\ + "

Crate {}

\
\

Version {}

\
\ @@ -554,7 +554,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { page.root_path = "./"; let mut style_files = self.shared.style_files.clone(); - let sidebar = "

Settings

"; + let sidebar = "

Settings

"; style_files.push(StylePath { path: PathBuf::from("settings.css"), disabled: false }); let v = layout::render( &self.shared.layout, diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 53112c87fdc61..5022ed9fc7b37 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1690,7 +1690,7 @@ fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer) { { write!( buffer, - "

{}{}

", + "

{}{}

", match *it.kind { clean::StructItem(..) => "Struct ", clean::TraitItem(..) => "Trait ", @@ -1753,7 +1753,7 @@ fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer) { // to navigate the documentation (though slightly inefficiently). if !it.is_mod() { - buffer.write_str("

Other items in
"); + buffer.write_str("

Other items in
"); for (i, name) in cx.current.iter().take(parentlen).enumerate() { if i > 0 { buffer.write_str("::"); @@ -1765,7 +1765,7 @@ fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer) { *name ); } - buffer.write_str("

"); + buffer.write_str("

"); } // Sidebar refers to the enclosing module, not this module. @@ -1876,7 +1876,7 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) { ret.sort(); out.push_str( - "Methods\ + "

Methods

\
", ); for line in ret { @@ -1941,24 +1941,24 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) { if !concrete_format.is_empty() { out.push_str( - "\ - Trait Implementations", + "

\ + Trait Implementations

", ); write_sidebar_links(out, concrete_format); } if !synthetic_format.is_empty() { out.push_str( - "\ - Auto Trait Implementations", + "

\ + Auto Trait Implementations

", ); write_sidebar_links(out, synthetic_format); } if !blanket_format.is_empty() { out.push_str( - "\ - Blanket Implementations", + "

\ + Blanket Implementations

", ); write_sidebar_links(out, blanket_format); } @@ -2010,7 +2010,7 @@ fn sidebar_deref_methods(cx: &Context<'_>, out: &mut Buffer, impl_: &Impl, v: &V if !ret.is_empty() { write!( out, - "Methods from {}<Target={}>", + "

Methods from {}<Target={}>

", Escape(&format!("{:#}", impl_.inner_impl().trait_.as_ref().unwrap().print(cx))), Escape(&format!("{:#}", real_target.print(cx))), ); @@ -2046,7 +2046,7 @@ fn sidebar_struct(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, s: &clea if !fields.is_empty() { if let CtorKind::Fictive = s.struct_type { sidebar.push_str( - "Fields\ + "

Fields

\
", ); @@ -2123,8 +2123,8 @@ fn sidebar_trait(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, t: &clean print_sidebar_section( buf, &t.items, - "\ - Associated Types
", + "

\ + Associated Types

", |m| m.is_associated_type(), |out, sym| write!(out, "{0}", sym), "
", @@ -2133,8 +2133,8 @@ fn sidebar_trait(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, t: &clean print_sidebar_section( buf, &t.items, - "\ - Associated Constants
", + "

\ + Associated Constants

", |m| m.is_associated_const(), |out, sym| write!(out, "{0}", sym), "
", @@ -2143,8 +2143,8 @@ fn sidebar_trait(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, t: &clean print_sidebar_section( buf, &t.items, - "\ - Required Methods
", + "

\ + Required Methods

", |m| m.is_ty_method(), |out, sym| write!(out, "{0}", sym), "
", @@ -2153,8 +2153,8 @@ fn sidebar_trait(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, t: &clean print_sidebar_section( buf, &t.items, - "\ - Provided Methods
", + "

\ + Provided Methods

", |m| m.is_method(), |out, sym| write!(out, "{0}", sym), "
", @@ -2176,8 +2176,8 @@ fn sidebar_trait(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, t: &clean if !res.is_empty() { res.sort(); buf.push_str( - "\ - Implementations on Foreign Types\ + "

\ + Implementations on Foreign Types

\
", ); for (name, id) in res.into_iter() { @@ -2189,11 +2189,11 @@ fn sidebar_trait(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, t: &clean sidebar_assoc_items(cx, buf, it); - buf.push_str("Implementors"); + buf.push_str("

Implementors

"); if t.is_auto { buf.push_str( - "Auto Implementors", + "

Auto Implementors

", ); } @@ -2236,7 +2236,7 @@ fn sidebar_union(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, u: &clean if !fields.is_empty() { sidebar.push_str( - "Fields\ + "

Fields

\
", ); @@ -2268,7 +2268,7 @@ fn sidebar_enum(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, e: &clean: if !variants.is_empty() { variants.sort_unstable(); sidebar.push_str(&format!( - "Variants\ + "

Variants

\
{}
", variants.join(""), )); diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index b88e4ac5c28e5..e514a965b2cf4 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -293,9 +293,12 @@ nav.sub { .sidebar .location { border: 1px solid; font-size: 17px; + font-weight: inherit; margin: 30px 10px 20px 10px; text-align: center; word-wrap: break-word; + font-weight: inherit; + padding: 0; } .sidebar .version { @@ -348,6 +351,8 @@ nav.sub { text-align: center; font-size: 17px; margin-bottom: 5px; + font-weight: inherit; + padding: 0; } .sidebar-links {