| Age | Commit message (Collapse) | Author | Lines |
|
r=GuillaumeGomez
rustdoc: use flexbox CSS to align sidebar button instead of position
This accomplishes the same thing with significantly less code.
Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-toggle-flexbox/src/test_dingus/lib.rs.html
|
|
rustdoc: remove no-op CSS `#help dt { display: block }`
`display: block` is the [default UA style] for dt.
[default UA style]: https://html.spec.whatwg.org/multipage/rendering.html#lists
|
|
This accomplishes the same thing with significantly less code.
|
|
`display: block` is the [default UA style] for dt.
[default UA style]: https://html.spec.whatwg.org/multipage/rendering.html#lists
|
|
It's misleading unless it gets changed to respond to being clicked.
|
|
r=notriddle
Migrate source code elements style to CSS variables
r? ``@notriddle``
|
|
|
|
r=GuillaumeGomez
rustdoc: simplify `.search-results-title` CSS
By using `display: flex`, we still get the never-wrapping layout with `#crate-search-div` maxing out and truncating its text. The title itself winds up always filling its parent, but since `#crate-search` doesn't have `flex-grow` set, it won't fill available space.
|
|
r=notriddle
Small accessibility improvements
From this [reddit post](https://www.reddit.com/r/rust/comments/z1gyz7/accessible_documentation/), I started to check a bit how to improve accessibility and how we could add test for it.
So these two fixes come from the use of the [pa11y tool](https://github.com/pa11y/pa11y). To make it work, I had to update its puppeteer version to the last one but otherwise it seems to be quite nice. I didn't fix all the errors it reported because they were about colors. To get the same result as mine, you can use this config:
```json
{
"ignore": [
"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail",
"WCAG2AA.Principle3.Guideline3_2.3_2_2.H32.2"
]
}
```
I think trying to improve accessibility is something we should definitely aim for. I'll try to integrate a tool to enforce this check (very likely `pa11y`) directly into the CI.
cc ``@jsha``
r? ``@notriddle``
|
|
By using `display: flex`, we still get the never-wrapping layout with
`#crate-search-div` maxing out and truncating its text. The title itself
winds up always filling its parent, but since `#crate-search` doesn't have
`flex-grow` set, it won't fill available space.
|
|
r=GuillaumeGomez
rustdoc: give struct fields CSS `display: block`
Fixes #104737
|
|
* Set aria-label attribute on search input
* Put anchor text directly into the DOM and not in the CSS
|
|
|
|
Since this box is absolutely positioned, its display type is [blockified]
anyway. We just need to make sure it isn't `display: none`.
[blockified]: https://www.w3.org/TR/css-display-3/#transformations
|
|
Since this box is absolutely positioned, its display type is [blockified]
anyway. We just need to make sure it isn't `display: none`.
[blockified]: https://www.w3.org/TR/css-display-3/#transformations
|
|
r=notriddle
Migrate alias search result to CSS variables
r? `@notriddle`
|
|
|
|
|
|
Migrate kdb style to CSS variables
r? `@notriddle`
|
|
r=GuillaumeGomez
rustdoc: use real buttons for scrape examples controls
This makes the expand and switch controls keyboard-accessible.
Preview: https://notriddle.com/notriddle-rustdoc-demos/scrape-examples-button/test_dingus/fn.test.html
|
|
|
|
|
|
r=notriddle
Migrate top buttons style to CSS variables
No UI changes.
r? `@notriddle`
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #102977 (remove HRTB from `[T]::is_sorted_by{,_key}`)
- #103378 (Fix mod_inv termination for the last iteration)
- #103456 (`unchecked_{shl|shr}` should use `u32` as the RHS)
- #103701 (Simplify some pointer method implementations)
- #104047 (Diagnostics `icu4x` based list formatting.)
- #104338 (Enforce that `dyn*` coercions are actually pointer-sized)
- #104498 (Edit docs for `rustc_errors::Handler::stash_diagnostic`)
- #104556 (rustdoc: use `code-header` class to format enum variants)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
rustdoc: use `code-header` class to format enum variants
The font size and weights should be exactly the same after this PR, but the spacing is changed to be the same as methods.
Preview: http://notriddle.com/notriddle-rustdoc-demos/variant/test_dingus_enum/enum.TestEnum.html
|
|
r=GuillaumeGomez
rustdoc: clean up sidebar width CSS
This commit takes advantage of the ability to set [flex-basis] to a specific length instead of setting it to `auto` and changing min-/max-width, and setting flex-grow/-shrink both to 0.
This PR should not cause any visual changes.
preview: https://notriddle.com/notriddle-rustdoc-demos/flex-basis-sidebar-width/std/index.html
[flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
|
|
The font size and weights should be exactly the same after this commit,
but the spacing is changed to be exactly the same as methods.
|
|
Migrate tooltip style to CSS variables
|
|
|
|
This commit takes advantage of the ability to set [flex-basis] to a specific
length instead of setting it to `auto` and changing min-/max-width, and
setting flex-grow/-shrink both to 0.
[flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
|
|
Before 7f6ce7dddd49f453da15bb4d586a5990985814d8, light-theme where clauses
had color `#4E4C4C` while the main color was `#000`. One of that commit's
simplifications made it so that everything used the same black.
|
|
r=GuillaumeGomez
rustdoc: remove no-op CSS `#crate-search-div { display: inline-block }`
`#crate-search-div` is nested directly below `.search-results-title`, which has `display: inline-flex`. This makes the crate-search-div a [flex item], which makes its display property irrelevant, because flex items have their display [blockified] in any case.
[flex item]: https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item
[blockified]: https://www.w3.org/TR/css-flexbox-1/#flex-items
|
|
r=GuillaumeGomez
rustdoc: remove pointless CSS `.rightside { padding-right: 2px }`
This CSS was added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, as `.since { padding-right: 2px }`, to prevent it from uncomfortably touching the srclink, which were separate floated elements. It was carried forward with 962c0a4ee59e3c1a2413e785694c9433ffd0a9e1 to the new `.rightside`, but its role was replaced with adding " • " between them. All it does now is pushes the element 2px away from the page's right margin.
Removing this rule changes the page layout, but you have to look for it to notice it.
|
|
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.
|
|
`#crate-search-div` is nested directly below `.search-results-title`, which
has `display: inline-flex`. This makes the crate-search-div a [flex item],
which makes its display property irrelevant, because flex items have their
display [blockified] in any case.
[flex item]: https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item
[blockified]: https://www.w3.org/TR/css-flexbox-1/#flex-items
|
|
This CSS was added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, as
`.since { padding-right: 2px }`, to prevent it from uncomfortably touching
the srclink, which was a separate floated element. It was carried forward
with 962c0a4ee59e3c1a2413e785694c9433ffd0a9e1 to the new `.rightside`, but
its role was replaced with adding " • " between them. All it does now
is pushes the element 2px away from the page's right margin.
Removing this rule changes the page layout, but you have to look for it to
notice 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.
|
|
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.
|
|
According to https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/CSS.20cleanup
this style was added for declarations that no longer use opacity.
|
|
r=GuillaumeGomez
rustdoc: remove no-op CSS `.scrape-help { background: transparent }`
It's a link. This is the default CSS for it.
|
|
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.
|
|
|
|
It's a link. This is the default CSS for it.
|
|
|
|
|
|
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

|