| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Fix boldness (put it back where needed)
I realized that I created a GUI test that wasn't run because it had ".rs" extension instead of ".goml" so I moved its content into `font-weight.goml` (since it was checking font weight).
|
|
|
|
|
|
Show triangle on the "Details" disclosure element in all cases
Re-submission of #82805, fixes the style issue by applying the same margin as `<p>`.
<details><summary>Before</summary>


</details>
<details><summary>After</summary>


</details>
r? `@GuillaumeGomez`
|
|
|
|
|
|
Co-authored-by: Miguel Ojeda <ojeda@kernel.org>
|
|
|
|
|
|
* implement sans-serif #85621
|
|
rustdoc: add optional woff2 versions of Source Serif and Source Code
This provides woff2 versions of Source Serif and Source Code similar to how #82545 provides woff2 versions of Fira Sans. The total byte count for the six files (three for each font family) is reduced by 25% from 476 KiB to 358 KiB.
|
|
matteo-briani:fix-rustdoc-stabilized-versions-layout, r=GuillaumeGomez
Fix rustdoc stabilized versions layout
Fixes #86342
r? `@GuillaumeGomez`
|
|
|
|
|
|
Also factor out outer_version and const_outer_version into
render_rightside.
|
|
This covers rendering of stability_since and the srclink across methods
and trait implementations, so their DOM representation is consistent.
|
|
That means it will be visible under "Implementors" on trait pages, and
under "Implementations" on struct/enum pages, even when all methods are
collapsed.
Switch to a float layout for rightside elements.
|
|
|
|
Type page font weight
Fixes https://github.com/rust-lang/rust/issues/86069.
r? ```@jsha```
|
|
|
|
|
|
Sidebar unification
This PR does a few things:
* Put crates list at all levels (before, it was only on the "top" items)
* Fix bug in module sidebar: the list of items was from the parent module.
The other changes (on bootstrap mostly) were to allow to generate multiple crates in a same folder so that we can ensure that clicking on the crates in the sidebar works as expected.
I added a rustdoc-gui test to ensure everything is where it should be.
r? `@jyn514`
|
|
|
|
|
|
|
|
|
|
In the meantime, allow all of the details to have the same top.
|
|
|
|
Avoid CJK legacy fonts in Windows
As metioned in #84035, the default serif CJK font in Windows is meh-looking.
To avoid this, we should use sans-serif font or provide CJK glyph supported font in `rustdoc.css`.
|
|
|
|
Restore sans-serif font for module items.
This was broke in #84462 by modifying a style that applied both to
searches and to module items (and other tables).
Fixes #85616.
Fixes https://github.com/rust-lang/rust/issues/85545.
r? `@camelid`
|
|
Fix search results display
Fixes https://github.com/rust-lang/rust/issues/85544.
cc `@dns2utf8`
r? `@jsha`
|
|
This was broke in #84462 by modifying a style that applied both to
searches and to module items (and other tables).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rustdoc: restore header sizes
The `<details>` toggle work changed the relationship from #main to the top-doc docblock so it was no longer a parent relationship but a great-grandparent relationship. This updates the CSS rules that set the heading sizes so they still apply.
Fixes #85389
r? ``@camelid``
|
|
Improve display for "copy-path" button, making it more discreet
As suggested by `@Nemo157` [here](https://github.com/rust-lang/rust/pull/85118#issuecomment-838887670):






r? `@jsha`
|
|
rustdoc: use focus for search navigation
Rather than keeping track of highlighted element inside the JS, take advantage of `.focus()` and the :focus CSS pseudo-class.
This required wrapping each row of results in one big `<a>` tag (because anchors can be focused, but table rows cannot). That in turn required moving from a table layout to a div layout with float.
This makes it so Ctrl+Enter opens links in new tabs, and using the arrow keys to navigate off the bottom of the page scrolls the rest of the page into view. It also simplifies the keyboard event handling. It eliminates the need for click handlers on the search results, and for tracking mouse movements.
This changes the UI treatment of mouse hovering. A hovered element now gets a light grey background, but does not change the focus. It's possible to have two highlighted search results: one that is focused (via keyboard) and one that is hovered (via mouse). Pressing enter will activate the focused link; clicking will activate the hovered link. This matches up with how Firefox and Chrome handle suggestions in their URL bar, and avoids stray mouse movements changing the focus.
Selecting tabs is now done with left/right arrows while any search result is focused. The visibility of results on each search tab is
controlled with the "active" class, rather than by setting display: none directly. Note that the old code kept track of highlighted search element when tabbing back and forth. The new code doesn't.
Demo at https://hoffman-andrews.com/rust/focus-search-results2/std/?search=fn
Fixes #84384
Fixes #79962
Fixes #79872
|
|
|
|
|
|
Fix toggle position on mobile
Before:


After:


r? ```@jsha```
|
|
Fix display for "implementors" section
Just saw this problem when going through docs:

This fix puts it back to normal:

You can see it on the `TryFrom` page for example.
r? ```@Nemo157```
|
|
|
|
|