Skip to content

Improve topbar crate dropdown menu by removing uneeded information #1259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions templates/rustdoc/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
</li>

<li class="pure-menu-item">
<a href="{{ crate_url | safe }}" class="pure-menu-link" class="description">
{{ "cube" | fas(fw=true) }} {{ krate.description }}
<a href="{{ crate_url | safe }}" class="pure-menu-link description" title="See {{ krate.name }} in docs.rs">
{{ "cube" | fas(fw=true) }} Docs.rs crate page
</a>
</li>

Expand Down Expand Up @@ -88,12 +88,6 @@
<span class="title">Source</span>
</a>
</li>

<li class="pure-menu-item">
<a href="{{ crate_url | safe }}" class="pure-menu-link" title="See {{ krate.name }} in docs.rs">
{{ "cube" | fas(fw=true) }} More information
</a>
</li>
</ul>
</div>

Expand Down
4 changes: 4 additions & 0 deletions templates/style/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ div.nav-container {
font-weight: 400;
color: var(--color-navbar-standard);

&.description {
font-size: 0.9em;
}

// Improves menu link readability when inverting the colors on focus.
// Vendor do background-color #eee, looks weird on different theme.
&:focus {
Expand Down