| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Remove unused CSS rule
As you can see in the firefox devtools:

It needs the display to be `grid` or `inline-grid`, which isn't the case.
r? `@dns2utf8`
|
|
|
|
|
|
librustdoc: Use correct heading levels.
Closes #89309
This fixes the `<h#>` header tags throughout the docs to reflect a semantic hierarchy.
- I ran a script to manually check that we don't have any files with multiple `<h1>` tags.
- Also checked that we never incorrectly nest e.g. a `<h2>` under an `<h3>`.
- I also spot-checked a bunch of pages (`trait.Read`, `enum.Ordering`, `primitive.isize`, `trait.Iterator`).
|
|
|
|
- Avoid multiple <h1>s on a page.
- The <h#> tags should follow a semantic hierarchy.
- Cap at h6 (no h7)
|
|
overlay row entries after a UA specific amount of rows
|
|
|
|
|
|
|
|
|
|
[rustdoc] Wrap code blocks in <code> tag
This PR modifies Rustdoc output so that fenced code snippets, items and whole file source codes are wrapped in `<pre><code>` instead of just `<pre>`. This should improve the semantic meaning of the generated content.
I'm not sure what to do about `render_attributes_in_pre` and `render_attributes_in_code`. These functions were clearly expected to be used for things inside `<pre>` or `<code>`, and since I added `<code>` in this PR, some of them will be used in a different context than before. However, it seems to me that even before they were not consistent. For example, `item_constant` used `render_attributes_in_code` for its attributes, however there was no `<code>` used for constants before this PR...
Should I create some `rustdoc-gui` tests? For example to check that all `<pre>` tags have a `<code>` child?
Fixes: https://github.com/rust-lang/rust/issues/88020
|
|
|
|
Add background-color on clickable definitions in source code
Someone suggested to add a decoration on clickable elements in the source code pages:



The idea is to not disturb the reading while telling the reader "you can click on this one", which is why it's not a text decoration.
What do you think `@rust-lang/rustdoc` ?
r? `@Nemo157`
|
|
|
|
|
|
Closes #87828
The issue seems to stem from #87210 where code headings were changed from a heading containing code to a heading with the `code-header` class. `rustdoc.css` was updated, but `ayu.css` was missed.
|
|
|
|
|
|
|
|
|
|
This way, we can show the plus and minus buttons on screens, while voice
control will read off actual words "Collapse" and "Expand" instead of reading
"open brace minus close brace" and "open brace plus close brace".
Part of #87059
|
|
r=GuillaumeGomez
Rustdoc accessibility: use real headers for doc items
Part of #87059
Partially reverts #84703
Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
|
|
Part of #87059
Partially reverts #84703
Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
|
|
Change rustdoc logo to use the full container size
We have a logo in svg that scales nicely to large sizes, but by default
is only 5px large, i.e. very small. With the change the logo expands to
the full size. By only setting the height to 100% we ensure that the
width-height ratio isn't changed.
|
|
* The toggle adds visual clutter
* It's easy to miss that there are fields
* Tuple variant fields are always shown, so it is inconsistent to hide
struct variant fields
* It's annoying to have to click the toggle every time
|
|
We have a logo in svg that scales nicely to large sizes, but by default
is only 5px large, i.e. very small. With the change the logo expands to
the full size. By only setting the height to 100% we ensure that the
width-height ratio isn't changed.
|
|
Fix docblock <table> overflow
Before:

After:

cc `@SergioBenitez`
r? `@notriddle`
|
|
Fix "item info" width
Fixes #87202.
It now looks again like this:

cc `@jyn514`
r? `@notriddle`
|
|
|
|
|
|
|
|
Part of #87059
Preview it at: https://notriddle.com/notriddle-rustdoc-test/rustdoc-sidebar-header/std/index.html
|
|
r=GuillaumeGomez
feat(rustdoc): open sidebar menu when links inside it are focused
Fixes #87172
Based on #87167 (which should be merged first)
r? ``@GuillaumeGomez``
Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
|
|
Fixes #87172
Based on #87167 (which should be merged first)
Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
Co-authored-by: Guillaume Gomez <guillaume.gomez@huawei.com>
|
|
Fix sidebar display on small devices
Part of #87059.
Instead of hiding the sidebar on small devices, we instead move it out of the viewport so that it remains "visible" to our text only users.
Could you confirm it works for you `@ahicks92` and `@DataTriny` please? You can give it a try at [this URL](https://guillaume-gomez.fr/rustdoc-test/test_docs/index.html).
r? `@notriddle`
|
|
|
|
|
|
Fix Ayu theme <code> color
Fixes #87072 (the second regression).
r? `@notriddle`
|
|
Fix codeblocks overflow
Fixes #87043.
Instead of completely relying on `pulldown-cmark` (and its potential changes), I decided to move the generation of codeblocks HTML directly in rustdoc so we can unify the DOM and the CSS classes.
r? `@Nemo157`
|
|
|
|
|
|
|
|
|
|
|
|
|