| Age | Commit message (Collapse) | Author | Lines |
|
This change makes it so, instead of mixing string distance with
type unification, function signature search works by
mapping names to IDs at the start, reporting to the user any
cases where it had to make corrections, and then matches with
IDs when going through the items.
This only changes function searches. Name searches are left alone,
and corrections are only done when there's a single item in the
search query.
|
|
Fixes the desktop scrolling weirdness mentioned in
https://github.com/rust-lang/rust/pull/98775#issuecomment-1182575603
As described in the MDN page for this property:
* The current Firefox ESR is 102, and the first Firefox version
to support this feature is 59.
* The current Chrome version 112, and the first version to support
this is 63.
* Edge is described as having a minor bug in `none` mode, but we
use `contain` mode anyway, so it doesn't matter.
* Safari 16, released September 2022, is the last browser to
add this feature, and is also the oldest version we officially
support.
|
|
rustdoc: avoid including line numbers in Google SERP snippets

|
|
|
|
|
|
improve UX
|
|
This is based on the compatibility data for `window.matchMedia` and
`MediaQueryList`'s `EventTarget` implementation.
https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList#browser_compatibility
https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia#browser_compatibility
* EventTarget would require us to drop support for all Chrome
versions before 39. However, we already require Chrome 49,
because rustdoc requires [CSS variables].
* EventTarget would also limit us to Firefox 55, but since #106502
rustdoc only supports Firefox > 68.
* EventTarget limits us to Mobile Safari version 14, but #102404
shows that our CSS is broken in Safari versions before 15.5.
[CSS variables]: https://developer.mozilla.org/en-US/docs/Web/CSS/--*#browser_compatibility
|
|
This converts a few functions to more compact versions of
themselves, and moves `RUSTDOC_MOBILE_BREAKPOINT` to main.js where
it's actually used.
|
|
Reverts a1d4ebe4961c107272f9764d1908227a3cd04092, as well as
fixing the problem it solved with links losing their color.
|
|
|
|
rustdoc: simplify DOM for `.item-table`
This switches from using `<div>` to the more semantic `<ul>`, and using class names that rhyme with the classes the search results table uses.
|
|
r=GuillaumeGomez
rustdoc: merge doctest tooltip with notable traits tooltip
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000
<details><summary>a user report where the tooltip arrow overlaps the text</summary>

</details>
Fixes #91100
Preview: <https://notriddle.com/notriddle-rustdoc-demos/simplify-doctest-tooltip/std/vec/struct.Vec.html#indexing>
Screenshot:

|
|
|
|
This switches from using `<div>` to the more semantic `<ul>`, and
using class names that rhyme with the classes the search results
table uses.
|
|
rustdoc: fix item-spacer
rustdoc: use proper comment style
rustdoc: change formatting where clauses for traits
rustdoc: remove semicolon from provided methods
update provided methods formatting
|
|
Co-Authored-By: David Tolnay <dtolnay@gmail.com>
|
|
Inline CSS background images directly into the CSS
A nice advantage of this is that it removes a few entries in the list of static files.
r? ``@notriddle``
|
|
|
|
rustdoc: stop making unstable items transparent
Fixes #93393
|
|
rustdoc: update Source Serif 4 from 4.004 to 4.005
[Version 4.005](https://github.com/adobe-fonts/source-serif/releases/tag/4.005R) was released on 2023-01-20.
|
|
Fixes #93393
|
|
Migrate last part of CSS themes to CSS variables
No changes in the output. This is already tested in `tests/rustdoc-gui/search-tab.goml` so no need to add a GUI test.
r? `@notriddle`
|
|
|
|
|
|
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000
Fixes #91100
|
|
|
|
Version 4.005 was released on 2023-01-20.
|
|
|
|
|
|
r=notriddle
rustdoc: Use correct pseudo-element selector
As explained [here](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements#syntax).
I wrote it on top of #107152 so we'll need to wait for this one to be merged first.
r? `@notriddle`
|
|
Migrate scraped-examples top and bottom "borders" to CSS variables
r? `@notriddle`
|
|
|
|
|
|
Since the current sidebar item is already a link, it doesn't
do anything.
|
|
r=GuillaumeGomez
rustdoc: remove `docblock` class from notable trait popover
This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes the `docblock` class from the All Items page, and 9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class from the item decl.
Fixes #92974
|
|
rustdoc: remove unnecessary DOM class `h1.fqn`
It's misleading. The main heading sometimes isn't an fully qualified name at all.
It's also redundant. It's always a child of `div.main-heading`, so just use that.
|
|
This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes
the `docblock` class from the All Items page, and
9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class
from the item decl.
Fixes #92974
|
|
This swaps things around so that the class that gets used more often has
the shorter name.
|
|
It's misleading. The main heading sometimes isn't an fully qualified name at all.
It's also redundant. It's always a child of `div.main-heading`, so just use that.
|
|
|
|
Fix scrolling for item declaration block
Fixes https://github.com/rust-lang/rust/issues/105580.
The `contain: layout` was the issue here and the bug was actually on both mobile and desktop.
r? `@notriddle`
|
|
|
|
|
|
r=GuillaumeGomez
rustdoc: remove no-op mobile CSS `.content { margin-left: 0 }`
This rule was added to override non-zero left margin on `.content`, which was removed in 135281ed1525db15edd8ebd092aa10aa40df2386 and the margin-left was put on the docblock.
|
|
This rule was added to override non-zero left margin on `.content`,
which was removed in 135281ed1525db15edd8ebd092aa10aa40df2386 and
the margin-left was put on the docblock.
|
|
This CSS was added in dc2c9723343c985740be09919236a6e96c4e4433,
before 6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c when the sidebars
were merged.
Now that they are merged, the source sidebar is being pushed
off-screen anyway, so giving it zero width doesn't do much.
|
|
rustdoc: remove legacy user-select CSS
According to [caniuse], the only supported browser that requires the vendor prefix, as defined in [RFC 1985], is Safari.
* The last version of Chrome that required a vendor prefix was version 53. The current version is 108.
* Firefox 68 is the last version that required a vendor prefix. The [current Firefox ESR] is version 102.
* The current version of Safari for Mac and iOS still requires a prefix.
* The last version of Edge that required a vendor frefix was 18. The current version of Edge is 108.
* UCAndroid support is unknown, but if it still requires a vendor prefix, it's more likely to be `-webkit-` than `-moz-` or `-ms-`, since they would want to emulate iOS for compatibility.
[caniuse]: https://caniuse.com/?search=user-select
[RFC 1985]: https://rust-lang.github.io/rfcs/1985-tiered-browser-support.html
[current Firefox ESR]: https://wiki.mozilla.org/Releases
|
|
According to [caniuse], the only supported browser that requires the vendor prefix,
as defined in [RFC 1985], is Safari.
* The last version of Chrome that required a vendor prefix was version 53.
The current version is 108.
* Firefox 68 is the last version that required a vendor prefix. The
[current Firefox ESR] is version 102.
* The current version of Safari for Mac and iOS still requires a prefix.
* The last version of Edge that required a vendor frefix was 18. The current
version of Edge is 108.
* UCAndroid support is unknown, but if it still requires a vendor prefix,
it's more likely to be `-webkit-` than `-moz-` or `-ms-`, since they
would want to emulate iOS for compatibility.
[caniuse]: https://caniuse.com/?search=user-select
[RFC 1985]: https://rust-lang.github.io/rfcs/1985-tiered-browser-support.html
[current Firefox ESR]: https://wiki.mozilla.org/Releases
|
|
Fix --kbd-color variable name in rustdoc.css
Interestingly enough, it only impacted the dark theme.
Before:

After:

r? `@notriddle`
|
|
|