| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
r=GuillaumeGomez
rustdoc: remove no-op CSS `.main-header { justify-content }`
This rule was added in 152e8889052adaaa6c12652486292be34059713c to push the out-of-band content to the right while allowing it to line wrap when it got too big. The idea was that the justification rule would fill the space between the `<h1>` element and the `<div class="out-of-band">` element.
A later commit, 3cb03cb34247383ffb67a017ae70134741e8c4da, flattened the in-band element into the `<h1>`, copying the `flex-grow` rule. This means the `<h1>` element now grows to fill the space, so there's no need to justify-content any more.
This commit also adds a test case for this.
|
|
r=GuillaumeGomez
rustdoc: remove no-op CSS `.popover { font-size: 1rem }`
This rule was added in cc4f804829ae because the help popover inherited the font-size from the help button "?" icon.
It doesn't inherit this any more, because it was moved from being nested inside the link to sharing a wrapper DIV with it.
|
|
This rule was added in 152e8889052adaaa6c12652486292be34059713c to push the
out-of-band content to the right while allowing it to line wrap when it got
too big. The idea was that the justification rule would fill the space
between the `<h1>` element and the `<div class="out-of-band">` element.
A later commit, 3cb03cb34247383ffb67a017ae70134741e8c4da, flattened the
in-band element into the `<h1>`, copying the `flex-grow` rule. This means
the `<h1>` element now grows to fill the space, so there's no need to
justify-content any more.
This commit also adds a test case for this.
|
|
|
|
|
|
|
|
|
|
r=GuillaumeGomez
rustdoc: use consistent "popover" styling for notable traits
Follow-up to #104129
Fixes https://github.com/rust-lang/rust/issues/104313.
Preview: https://notriddle.com/notriddle-rustdoc-demos/js-notable-trait-v2/std/iter/trait.Iterator.html#method.step_by
## Before


## After


|
|
rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a`
Example: https://notriddle.com/notriddle-rustdoc-demos/line-anchors/test_dingus/fn.test.html
This allows people to treat them like real links, such as right-click to copy URL, and makes the line numbers in a scraped example work at all, when before this commit was added, they had the clickable pointer cursor but did not actually do anything when clicked.
|
|
r=notriddle
Fix non clickable source link
Fixes https://github.com/rust-lang/rust/issues/104313.
It was also fixed in https://github.com/rust-lang/rust/pull/104177. If https://github.com/rust-lang/rust/pull/104177 is merged first, I'll simply remove the first commit to keep the test.
r? ``@notriddle``
|
|
|
|
|
|
|
|
rustdoc: use checkbox instead of switch for settings toggles
Preview: http://notriddle.com/notriddle-rustdoc-demos/checkbox/test_dingus/index.html
## Before

## After

## Description
The switch ("slider") is designed to give the application a "physical" feel, but nothing else in here really followed through. They didn't support the "flick" gesture that real iOS switches support, and the radio buttons that were also used in Rustdoc Settings were a more "classic" form element anyway.
Also, while switches are the exclusive toggle design on iOS (since [Apple HIG] reserves checkboxes for Mac only), the [Google Material] guidelines say that lists of switches are bad, and you should just use check boxes.
[Apple HIG]: https://developer.apple.com/design/human-interface-guidelines/components/selection-and-input/toggles
[Google Material]: https://m3.material.io/components/checkbox/guidelines#6902f23d-ceba-4b19-ae3b-b78b9b01d185
|
|
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #95292 (Allow specialized const trait impls.)
- #100386 (Make `Sized` coinductive, again)
- #102215 (Implement the `+whole-archive` modifier for `wasm-ld`)
- #103468 (Fix unused lint and parser caring about spaces to won't produce invalid code)
- #103531 (Suggest calling the instance method of the same name when method not found)
- #103960 (piece of diagnostic migrate)
- #104051 (update Miri)
- #104129 (rustdoc: use javascript to layout notable traits popups)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=Manishearth
rustdoc: use javascript to layout notable traits popups
Fixes #102576
Preview: https://notriddle.com/notriddle-rustdoc-demos/102576-js-notable-trait/std/iter/trait.Iterator.html#method.step_by
## Before

## After

|
|
|
|
The switch is designed to give the application a "physical" feel, but
nothing else in here really followed through. They didn't support the
"flick" gesture that real iOS switches support, and the radio
buttons that were also used in Rustdoc Settings were a more "classic"
form element anyway.
Also, while "switches" are the exclusive toggle design on iOS (since
[Apple HIG] reserves checkboxes for Mac only), the [Google Material]
guidelines say that lists of switches are bad, and you should just use
check boxes.
[Apple HIG]: https://developer.apple.com/design/human-interface-guidelines/components/selection-and-input/toggles
[Google Material]: https://m3.material.io/components/checkbox/guidelines#6902f23d-ceba-4b19-ae3b-b78b9b01d185
|
|
|
|
Add check in GUI test for file loading failure
Since https://github.com/rust-lang/rust/pull/101702, some resources location need to be updated in case their content changed because then their hash will change too. This will prevent errors like https://github.com/rust-lang/rust/pull/104114 to happen again.
The second commit is to prevent CORS errors: when a file is linked from a file itself imported, the web browser considers they come from a different domain and therefore triggers the error. The option tells the web browser to ignore this case.
cc ```@jsha```
r? ```@notriddle```
|
|
|
|
|
|
|
|
Fixes #102576
|
|
|
|
Migrate test-arrow to CSS variables
There should be no UI changes. I kept both `color` and `background-color` properties even though only the ayu theme is actually completely making use of them on hover.
r? ``@notriddle``
|
|
rustdoc: clean up `.logo-container` layout CSS
This commit should result in no appearance changes.
To make the logo container exactly the desired height, you want to get rid of the part of the box used for typographic descenders (you know, the part of g, y, and j that descends below the baseline). After all, it contains no text, but the space is still left open in the layout by default, because `<img>` is `display:inline`. The CSS used to employ three different tricks to accomplish this:
* By making `.sidebar .logo-container` a flex container, the image becomes a flex item and is [blockified], without synthesizing any inline boxes. No inline boxes means no descenders.
* By giving `.mobile-topbar .logo-container` a max-height exactly the same as the height of the image plus the padding, the descender area gets cut off.
* By setting `.sub-logo-container { line-height: 0 }`, we ensure that the only box that contributes to the height of the line box is the image itself, and not any zero-content text boxes that neighbor it. See the [logical height algorithm].
This commit gets rid of the first two hacks, leaving only the third, since it requires only one line of code to accomplish and doesn't require setting the value based on math.
[blockified]: https://drafts.csswg.org/css-flexbox-1/#flex-items
[logical height algorithm]: https://www.w3.org/TR/css-inline-3/#inline-height
|
|
|
|
|
|
|
|
|
|
There is a layout change caused by this commit, but it's subtle. You won't
notice it unless you're looking for it.
|
|
Hardcoded colors in rustdoc.css should usually be avoided.
|
|
GuillaumeGomez:migrate-sidebar-links-color-gui-test, r=notriddle
Migrate sidebar-links-color GUI test to functions
r? `@notriddle`
|
|
|
|
|
|
rustdoc: rename syntax highlighting CSS class `attribute` to `attr`
Link classes use the abbreviation `attr` ...
https://github.com/rust-lang/rust/blob/2afca78a0b03db144c5d8b9f8868feebfe096309/src/librustdoc/html/static/css/rustdoc.css#L255-L259
... so why does syntax highlighting use the full word?
https://github.com/rust-lang/rust/blob/2afca78a0b03db144c5d8b9f8868feebfe096309/src/librustdoc/html/static/css/rustdoc.css#L1095-L1097
|
|
|
|
This allows people to treat them like real links, such as right-click to
copy URL, and makes the line numbers in a scraped example work at all,
when before this commit was added, they had the clickable pointer cursor
but did not actually do anything when clicked.
|
|
Link classes use the abbreviation `attr`, so why shouldn't
syntax highlighting?
|
|
|
|
Migrate source line numbers CSS to CSS variables
Part of https://github.com/rust-lang/rust/pull/98460.
No UI changes.
r? ``@notriddle``
|
|
|
|
|
|
r=GuillaumeGomez
rustdoc: remove unused `.sidebar-logo` DOM on source pages
|