Open
Description
Also, the increased font size looks a little too big for the trait impls section, since there are a lot of impls and their items are not expanded by default. The new font size looks good for inherent impls though, since the items cause the headers to be spaced apart.
Before
After
cc #90155
cc @jsha @GuillaumeGomez
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
jsha commentedon Oct 27, 2021
I agree the section icon looks cramped now. It's not because of the font size, though: It's because previously the
impl
had a 15px indent, which I removed in #90155 for two reasons: the size of the indent was inconsistent (should have been 24px like other indents), and having an indent at all under an underlined prose header is inconsistent with what we do in other places, e.g.:Also contributing to crampedness is the presence of the
[+]
.One possible quick fix would be to re-indent the
impls
but do it by 24px this time. Another fix would be to move the[+]
further left into the gutter. That would probably make it look more awkward though. At a fundamental level, the[+]
and § are competing for space: both want to be immediately to the left of a heading.Another possibility would be to remove the § for impls. It's already the case that methods don't have §. See for instance https://doc.rust-lang.org/nightly/std/string/struct.String.html#method.new - the method name (like
new
) serves as the click target. If we could pick something withinimpl
(or the wholeimpl
heading) to be the click target, we could omit the §.camelid commentedon Oct 27, 2021
Yeah, I also thought of that, but it's possible it'll look funny. We could definitely try it though.
Agreed, that "competition" unfortunately adds more UI clutter.
The problem with making the whole heading be the click target is that there are already links within the header. I think it'd be confusing and might not even be valid HTML.