| Age | Commit message (Collapse) | Author | Lines |
|
rustdoc: remove no-op source sidebar `opacity`
These rules were added in dc2c9723343c985740be09919236a6e96c4e4433 to work with CSS transitions. They're otherwise redundant, since the `visibility` property already hides everything.
https://github.com/rust-lang/rust/blob/dc2c9723343c985740be09919236a6e96c4e4433/src/librustdoc/html/static/css/rustdoc.css#L350-L354
The transition was remove with 237d62588ddb4b7a93f3f5c61ea9253eba30ed5d, but the now-redundant `opacity` property was not.
|
|
|
|
This line was added in c494a06064017f307a8d9dc4797e614d2ed99143, because at
the time, the headers had these classes on them. Now, the headers are
children of the `<section>` with the class on it.
This commit also adds a test case, to make sure the srclink font weight does
not regress again.
|
|
Fix search result colors
Fixes regression introduced in https://github.com/rust-lang/rust/commit/99c00714cff0d13b6c5092c9949cb4e93a121346.
As you can see, ayu lost some colors for its search results:
beta/nightly:

stable:

We'll need to backport it to beta too to prevent it reaching stable.
r? `@notriddle`
|
|
|
|
Co-authored-by: Michael Howell <michael@notriddle.com>
|
|
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Containment
This affected layout a little and required adjustments to the CSS to
keep spacing the same. In particular, the margins of adjacent items
usually overlap with each other. However, when an item has contain:
layout, any margins of child nodes push out the size of the item itself.
This was making spacing between items a little too big. To solve that, I
removed margins in some places: in particular for certain classes that
often occur at the end of a `details.rustdoc-toggle` block, I removed
their bottom margin. Generally, the margins provided by the next item
down are sufficient.
Also remove an unnecessary margin-top on .code-header.
|
|
|
|
|
|
* Remove the `float: right` fallback from the main header, which hasn't
been needed since IE11 support was dropped.
* Remove `in-band` from low-level headers, which hasn't been needed since
`.rightside` switched to `float: right` in
593d6d1cb15c55c88319470dabb40126c7b7f1e2
* Remove unreachable `.in-band > code, .in-band > .code-header` CSS, since
the `in-band` class was attached to the `code-header` itself, not nested
directly below it.
* Use `rem` instead of `em` for code header margins.
* This results in a slight change in spacing around impls and item-info,
but since it makes it more consistent with the way methods are presented,
it's probably fine.
|
|
Improve rustdoc GUI tests
I finally finished the update so we can now store values in variables and use them. It improves things nicely.
r? ``@notriddle``
|
|
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #100734 (Split out async_fn_in_trait into a separate feature)
- #101664 (Note if mismatched types have a similar name)
- #101815 (Migrated the rustc_passes annotation without effect diagnostic infrastructure)
- #102042 (Distribute rust-docs-json via rustup.)
- #102066 (rustdoc: remove unnecessary `max-width` on headers)
- #102095 (Deduplicate two functions that would soon have been three)
- #102104 (Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests)
- #102112 (Allow full relro on powerpc64-unknown-linux-gnu)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=GuillaumeGomez
rustdoc: remove unnecessary `max-width` on headers
This code was added in 003b2bc1c65251ec2fc80b78ed91c43fb35402ec to prevent these headers from overlapping `.out-of-band` side items. That stopped being a problem when 3f92ff34b5a2fe8dd1a32aa27d437519e63782f0 switched rustdoc over to using `float`, rather than `position: absolute`, to implement this.
|
|
rustdoc: clean up line numbers on code examples
* First commit switches from `display: inline-flex; width: 100%` to `display: flex`.
`display: inline-flex` was used as part of https://github.com/rust-lang/rust/commit/e961d397cab900c55f8d8c104648852e2b63664e, the original commit that added these line numbers. Does anyone know why it was done this way?
* Second commit makes it so that toggling this checkbox will update the page in real time, just like changing themes does.
Preview: https://notriddle.com/notriddle-rustdoc-test/line-numbers/std/vec/struct.Vec.html
|
|
|
|
Prevent usage of .stab elements to create scrollable areas in doc blocks
Fixes #101874.
You can test it online [here](https://rustdoc.crud.net/imperio/stab-in-doblocks/foo/index.html).
r? `@notriddle`
|
|
|
|
|
|
|
|
rustdoc: remove no-op CSS `h1-6 { border-bottom-color }`
For this rule to have an actual effect, the border-bottom width needs specified, elsewhere, without also specifying the color. This doesn't happen. Ever since 88b137d5fe0cbe28dab4f9af61045c726f831872, every spot where headers get a border assigned to them also assigns the color.
Preview: https://notriddle.com/notriddle-rustdoc-test/border-bottom/rustc_monomorphize/collector/index.html
|
|
r=GuillaumeGomez
rustdoc: remove `docblock` class from `item-decl`
This class was originally added in 73b97c7e7c9cfac4dfa4804654b1db6ab687b589 to support hiding and showing the item, because `main.js` went through all `docblock` elements in the DOM and added toggles to them.
https://github.com/rust-lang/rust/blob/73b97c7e7c9cfac4dfa4804654b1db6ab687b589/src/librustdoc/html/static/main.js#L1856-L1867
The `item-decl` is no longer auto-hidden since c96f86de3026f864e78397aff9097e885f2f8fdf removed it.
`item-decl` used to be called `type-decl`: that name was changed in 8b7a2dd4626acf164e1ce8397878b3f5af83d585.
The `docblock` class is no longer used for implementing toggles, since rustdoc switched to using `<details>` elements.
Preview: https://notriddle.com/notriddle-rustdoc-test/docblock-item-decl/rustdoc/clean/types/enum.Type.html
|
|
|
|
|
|
|
|
|
|
rustdoc: clean up DOM by removing `.dockblock-short p`
On https://doc.rust-lang.org/nightly/std/ this reduces the number out of `document.querySelectorAll("*").length` from 1278 to 1103.
Preview: https://notriddle.com/notriddle-rustdoc-test/docblock-short-p/std/index.html
|
|
On https://doc.rust-lang.org/nightly/std/ this reduces the number out of
`document.querySelectorAll("*").length` from 1278 to 1103.
|
|
The rule `display: inline-block` was added in
5afa52bc7dee683f25f437dddf338dbc6ad32eb8.
The `margin: 0` and `font-weight: normal` were added in
c01bd560e2f87a9a960ed071213edd70f73171a8.
Both seem to have been added to override class-based rules that were
targetted at method sections. See
<https://github.com/rust-lang/rust/blob/c01bd560e2f87a9a960ed071213edd70f73171a8/src/librustdoc/html/static/rustdoc.css#L140-L148>
for an example. The selectors that these were meant to override were changed
in a8318e420d19c364b1eec33956a86164941f6df4 and
76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30 to be more specific, so they no
longer need to be overridden.
|
|
r=notriddle
Update browser UI test 0 10
The biggest change from this browser-ui-test update is the upgrade of the puppeteer version to `17.1.3` (the latest in short).
I also added the command `click-with-offset` to still allow us to click on the `[-]` part.
cc `@jsha`
r? `@notriddle`
|
|
|
|
Simplify codeblock and their associated tooltip
It is based on https://github.com/rust-lang/rust/pull/101600 so it needs to wait for this one to be merged first.
This PR does two things:
* Remove CSS class duplication by setting CSS classes such as `compile_fail` directly on the `div` wrapping both the codeblock and the tooltip.
* Simplify DOM: no need to wrap the tooltip into a `<div>`, it can work just as well without it.
You can test it [here](https://rustdoc.crud.net/imperio/codeblock-tooltip/std/string/struct.String.html#deref).
r? `@notriddle`
|
|
|
|
rustdoc: remove unused CSS `#search { position: relative }`
This was added in 611d0e6ccef8b60fa86ff5aa8fe3571cd36c444a, to allow its child `#results` element to be absolutely positioned inside it. The child stopped being absolute in 8c0469552e879f6319f8f96db660bab9eae1de5c.
To keep the layout looking the same, the links need to not have `width: 100%` any more, relying instead on the box naturally growing to fit because it has `display: block`.
|
|
Width changed by 2/4 pixels by b273c7502e363baeec293b972f671070e80f1391
|
|
This commit moves the tooltip into example-wrap, simplifying allowing several
overly-complex things to be fixed:
* The mousover javascript can be removed, because hovering example-wrap can
style the tooltip inside.
* The sibling selecor can be removed, because hovering the tooltip also
hovers the wrapper, which can hover the codeblock itself.
* The relative positioning of the `<li>` tag, which was added in
e861efd9f9ca45c1048a256812dfe8faffbb1367 to fix the positioning of the code
tooltip, can now be removed, because example-wrap itself already has
relative positioning.
|
|
|
|
|
|
|
|
rustdoc: remove old CSS selector that causes weird spacing
It was added with e08a84a0c18739417a50c3e46917ced5037244eb (actually, it was called `.methods > .stability` at the time) and was directly nested that way.
**EDIT**: It is technically reachable code still, but it seems wrong.
## With the old CSS rule still present
https://notriddle.com/notriddle-rustdoc-test/weird-spacing/lib/struct.Foo.html

## Version 2 (an older version of this PR)
https://notriddle.com/notriddle-rustdoc-test/normal-spacing-2/lib/struct.Foo.html

## Version 3 (with alignment fix for mobile)
https://notriddle.com/notriddle-rustdoc-test/normal-spacing-3/lib/struct.Foo.html

|
|
|
|
|
|
r=notriddle
Remove unneeded where whitespace
It fixes these two bugs:


It's a relic from a very old time (this commit: https://github.com/rust-lang/rust/commit/bfd01b7f40ae2cbfe9acbc1d10e79ffe16870df8).
You can test the result [here](https://rustdoc.crud.net/imperio/remove-unneeded-where-whitespace/lib2/struct.WhereWhitespace.html).
cc `````````@jsha`````````
r? `````````@notriddle`````````
|
|
ci: Upgrade non-dist Linux testers from ubuntu:16.04 to 22.04
The main goal of updating to 22.04 is to get away from `llvm.allow-old-toolchain`.
A side benefit is that they can also use the system `cmake` instead of building one.
|
|
|
|
|
|
Fix search results color on hover for ayu theme
Before:

After:

You can test it [here](https://rustdoc.crud.net/imperio/search-results-color-ayu/foo/index.html?search=item).
r? ``@jsha``
|
|
rustdoc: remove incorrect CSS selector `.impl-items table td`
Fixes #100994
This selector was added in c7312fbae4979c6d4fdfbd1f55a71cd47d82a480. The bug can be seen at <https://doc.rust-lang.org/1.27.0/alloc/slice/trait.SliceIndex.html#foreign-impls>.
This rule was added to help with a `<table>` that was used for displaying the function signature [src] lockup. That lockup was changed in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9 to use flexbox instead, leaving this selector unused (at least, for its original purpose).
|