| Age | Commit message (Collapse) | Author | Lines |
|
Fix tooltip position if the documentation starts with a code block
Fixes #74321.
Before:

After:

And in case there is text, it is not being applied:

And on mobile it isn't needed so it's not "activated":

r? @rust-lang/rustdoc
|
|
|
|
|
|
|
|
We need it for run buttons (https://github.com/rust-lang/rust/pull/44671), but not function defs
|
|
|
|
This makes the spotlight show on hover instead of click. Clicks can be
used to persist it, which is also what's used on mobile.
|
|
|
|
This reverts commit 1244ced9580b942926afc06815e0691cf3f4a846.
|
|
r=Dylan-DPC
Add margin after doc search results
I found it not really on computer that the last result is right at the bottom of the page. I find it better with margin below (especially when you hover the last element!). A screenshot to show the result:

r? @kinnison
cc @rust-lang/rustdoc @Manishearth @jyn514
|
|
|
|
This causes the components of FQN's to behave similarly to other links
in the contents of rustdoc-styled pages.
I (and I hope others at least in part) have found the prior design to be
somewhat confusing, as it is not clear (upon hovering) that the various
parts of the FQN are actually links that the user can navigate to.
In short, this patch makes links in the FQN have an underline when the
user hovers over them, more clearly indicating that they can be used for
navigation.
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
|
|
Previously, compile_fail and ignore code examples displayed a tooltip
indicating this in the documentation. This tooltip has now also been
added to should_panic examples.
|
|
|
|
Unblock font loading in rustdoc.css
rustdoc's font loading defaults to "auto", so browsers may block render.
But rustdoc's case prefers a faster TTI for scrolling, this means the
strictest font-display in use should be "swap". rustdoc's fonts do provide
notable legibility improvements but first-time users will have little trouble
reading without. This means "optional" is preferred.
The one exception is Source Serif Pro: it's a big difference for body text, so
"fallback" is preferred over "optional" to cause a (tiny) block.
This follows up on (but does not resolve) #20962, taking PageSpeed Insight's rec fairly directly. Supporting reading material: https://drafts.csswg.org/css-fonts-4/#font-display-desc
|
|
|
|
rustdoc's font loading defaults to "auto", so browsers may block render.
But rustdoc's case prefers a faster TTI for scrolling, this means the
strictest font-display in use should be "swap". rustdoc's fonts do provide
notable legibility improvements but first-time users will have little trouble
reading without. This means "optional" is preferred.
The one exception is Source Serif Pro: it's a big difference for body text, so
"fallback" is preferred over "optional" to cause a (tiny) block.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Preserve whitespace inside one-backtick codeblocks
Previously this was only done inside short docblocks (e.g., summary
lines), but we should also do so in general.
Fixes #65555
|
|
This reverts commit ea9519bf16f0be137a814a49c9fbaf232ba49a43.
|
|
rustdoc: fixes #64305: disable search field instead of hidding it
The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all.
@GuillaumeGomez
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
|
|
Previously this was only done inside short docblocks (e.g., summary
lines), but we should also do so in general.
|
|
|
|
|
|
|
|
|
|
r=Dylan-DPC
Fix search sidebar width when no crate select is present
Fixes #60480.
I also fixed the box-shadow that seemed to have been kind of removed?
r? @QuietMisdreavus
|
|
GuillaumeGomez:fix-position-source-code-files-toggle, r=Manishearth
Fix position source code files toggle
Fixes #60381.
The second commit is a big cleanup of the media queries.
r? @rust-lang/rustdoc
cc @Manishearth
screenshot of the fix:
<img width="501" alt="Screenshot 2019-04-29 at 23 42 56" src="https://user-images.githubusercontent.com/3050060/56929111-112b2b00-6ad9-11e9-9a23-e0a8e3641395.png">
|
|
Explicitly set height on rust logo <img> element in docs
The layout of the left side menu in docs reflows when navigating between pages because of missing height on the <img> element of rust logo.
Setting height='100' tells the browser to reserve that vertical space, leading to a less janky experience.
|
|
Fix attrs pos
Fixes #60042.
Screenshot:
<img width="438" alt="Screenshot 2019-05-12 at 15 02 25" src="https://user-images.githubusercontent.com/3050060/57582606-1455ec00-74c7-11e9-9d4e-5ec4da4de7dd.png">
r? @rust-lang/rustdoc
|
|
Remove hamburger button from source code page
Fixes #60483.
Screenshot:
<img width="575" alt="Screenshot 2019-05-03 at 00 12 51" src="https://user-images.githubusercontent.com/3050060/57110298-61ec8f00-6d38-11e9-85fd-d13be94b9c52.png">
cc @rust-lang/rustdoc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|