| Age | Commit message (Collapse) | Author | Lines |
|
This rule was added (actually, it was called `#main > .since` back then) with
cdca0843779eed0b9046e9fee48c91458ad51605 and you can see an example of the
bug it's intended to fix in <https://doc.rust-lang.org/1.9.0/std/fmt/fn.write.html>
by looking at the `1.0.0` version marker.
However, a5a2f2b951ea982a666eaf52b1874d8f1b17290b changed it so that
`<span class="since">` is always placed in an out-of-band wrapper, so it's
never nested directly below `#main` / `#main-content` any more.
|
|
r=GuillaumeGomez
rustdoc: remove unneeded CSS `.content table td:first-child > a`
This rule was added in c1c6175e62189f8f0e6479bff7bac0e59a95a406 to benefit the module items table. However, the module items table stopped using table tags when 6020c79ddeafe8d9760b27c14c39da81bac9b4a6 switched us over to grid layout.
|
|
This rule was added in c1c6175e62189f8f0e6479bff7bac0e59a95a406 to benefit
the module items table. However, the module items table stopped using table
tags when 6020c79ddeafe8d9760b27c14c39da81bac9b4a6 switched us over to grid
layout.
|
|
The impl-items list stopped being nested inside a docblock since c1b1d6804bfce1aee3a95b3cbff3eaeb15bad9a4
|
|
This class was added to support the function signature [src] lockup. That
lockup was changed in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9 to use flexbox
instead, leaving these selectors unused.
|
|
Merge duplicated CSS rules
I used the [stylelint](https://stylelint.io/user-guide/configure) tool to check for duplicated CSS rules in order to merge them.
r? `@notriddle`
|
|
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).
|
|
rustdoc: remove unused CSS for `hidden-by-*-hider`
This CSS seems to have become obsolete with the move to `<details>` tags,
and its corresponding JavaScript was removed in aee054d05d8b795d35c0b448a4b731b6507aa459
|
|
|
|
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).
|
|
This CSS seems to have become obsolete with the move to `<details>` tags,
and its corresponding JavaScript was removed in aee054d05d8b795d35c0b448a4b731b6507aa459
|
|
rustdoc: remove unused CSS for `.variants_table`
Continuation of #100938 and #101010. This rule was added to support the old, table-based style for displaying enum variants, which are now displayed using headers and paragraphs.
|
|
rustdoc: remove unused CSS for `.multi-column`
As a sanity check, [this tool] can be used to run a CSS query across an HTML tree to detect if a selector ever matches (I use compiler-docs and std docs). This isn't good enough, because I also need to account for JavaScript, but this class is never mentioned in any of the JS files, either.
According to [blame], this class was added when rustdoc was first written, and, as far as I can tell, was never actually used.
[this tool]: https://gitlab.com/notriddle/html-scanner
[blame]: https://github.com/rust-lang/rust/blame/4d45b0745ab227feb9000bc15713ade4b99241ea/src/librustdoc/html/static/css/rustdoc.css#L753-L761
|
|
Continuation of #100938 and #101010. This rule was added to support the old,
table-based style for displaying enum variants, which are now displayed using
headers and paragraphs.
|
|
As a sanity check, [this tool] can be used to run a CSS query across an HTML
tree to detect if a selector ever matches (I use compiler-docs and std
docs). This isn't good enough, because I also need to account for JavaScript,
but this class is never mentioned in any of the JS files, either.
According to [blame], this class was added when rustdoc was first written,
and, as far as I can tell, was never actually used.
[this tool]: https://gitlab.com/notriddle/html-scanner
[blame]: https://github.com/rust-lang/rust/blame/4d45b0745ab227feb9000bc15713ade4b99241ea/src/librustdoc/html/static/css/rustdoc.css#L753-L761
|
|
According to [blame], this rule was added to support enum struct
variants. However, enum struct variants don't use tables in their design
any more, so this rule does nothing.
[blame]: https://github.com/rust-lang/rust/blame/87991d5f5d72d6baca490141cb890211ba2f3843/src/librustdoc/html/static/css/rustdoc.css#L748
|
|
[rustdoc] Fix item info display
Fixes #100369.
The solution I came up with was simply to wrap the "text part" of the `item-info` into another span so that `flex` wouldn't mess with it.
Live demo is [here](https://rustdoc.crud.net/imperio/fix-item-info/foo/struct.ItemInfo.html).
r? ``@jsha``
|
|
|
|
|
|
|
|
Fix oversight duplicate property left in CSS (dark theme).
Improve wording in comment that mentions `appearance: none`
|
|
Resolves all of issue #93240
Reproduces a similar change as #99086, but with improvements
In particular, this PR inlcludes:
* redesigning the crate-search selector so the background color matches its surroundings
* decrease the font of the dropdown menu to a reaonable size
* add a hover effect
* make the color of the arrow theme-dependent, using a surrounding div, with :after pseudo-element
that can then be transformed using CSS filters to approximate the desired color
* fix the text "in" to match the title font
* remove the "for xyz" in the "Results for xyz in [All crates]" title when
searching for search term "xyz"; you can already see what you're searching for
as it's typed in the search bar!
* in line with #99086, handle super-long crate names appropriately without a long <select>
element escaping the screen area; the improvement is that we also keep the title
within a single line now; uses some flex layout shenanigans...
* the margins / paddings are adjusted so the selected label of the <select> fits within
the rest of that title nicely; also some inconsistency in the way that Firefox renders
a <select> with "appearance: none" (roughly 4px more padding left and right of the text
than e.g. Chrome) is worked around, and it now produces a result that looks (essentially)
identical to Chrome
* the color of the help menu and settings menu border in light theme is made to match with
the color of the corresponding buttons, like they do (match) in the ayu theme
* the casing of "All crates" changes to "all crates"
* the new tests from #99086 are temporarily disabled, until they can be adapted later
|
|
r=notriddle
Fix item info pos and height
Fixes https://github.com/rust-lang/rust/issues/98266.
Fixes https://github.com/rust-lang/rust/issues/98343.
You can test it [here](https://rustdoc.crud.net/imperio/fix-item-info-pos-and-height/lib2/trait.Trait.html).
Here is a screenshot of the result:

r? `@jsha`
|
|
Fix headings colors
Fixes #99797.

cc `@jsha`
r? `@notriddle`
|
|
|
|
|
|
|
|
|
|
Group CSS font rule
Another CSS cleanup I came by when working on something else.
r? ``@notriddle``
|
|
|
|
|
|
|
|
|
|
|
|
r=notriddle
Fix display of search result crate filter dropdown
In case a crate name is too long, the `<select>` completely overflows its parent. Another problem is that there is left margin on the `select` which break the alignment. You can see both issues here:

And with the fix:

cc `@jsha`
r? `@notriddle`
|
|
|
|
|
|
|
|
this change removes some interactive elements in `@media print` form.
more specifically, it removes the source links, the expand/collapse toggle buttons, and the `#copy-path` button.
it also adjusts some spacing and removes the `.top-doc` description completely if it's currently collapsed.
|
|
r=GuillaumeGomez
rustdoc: improve click behavior of the source code mobile full-screen "sidebar"
On desktop, if you open the source code sidebar, it stays open even when you move from page to page. It used to do the same thing on mobile, but I think that's stupid. Since the file list fills the entire screen on mobile, and you can't really do anything with the currently selected file other than dismiss the "sidebar" to look at it, it's safe to assume that anybody who clicks a file in that list probably wants the list to go away so they can see it.
Split out separately from #98772
|
|
r=GuillaumeGomez
rustdoc: make source sidebar toggle a real button
This fixes tab focus, so that you can open and close the sidebar from keyboard.
This should cause no visible change in appearance at all. The only way you'd know anything different is if you tried to use keyboard controls to open the source code file navigation sidebar.
Separated out from #98772
|
|
r=GuillaumeGomez
rustdoc: use <details> tag for the source code sidebar
This fixes the extremely poor accessibility of the old system, making it possible to navigate the sidebar by keyboard, and also implicitly gives the sidebar items the correct ARIA roles.
Split out separately from #98772
|
|
|
|
|
|
|
|
This fixes tab focus, so that you can open and close the sidebar
from keyboard.
|
|
https://user-images.githubusercontent.com/1593513/176974336-20cecdc3-1885-402a-a6d5-81a8dd03a45d.png
|
|
Use CSS variables to handle theming
This is the start for our simplification of theming. Considering how big the diff quickly becomes, I think it's better to do it in multiple parts.
(The 3 first commits come from https://github.com/rust-lang/rust/pull/98297 so once it's merged, they'll disappear).
Normally they shouldn't be any UI changes. You can check it [here](https://rustdoc.crud.net/imperio/css-simplification/doc/foo/index.html).
cc `@notriddle`
r? `@jsha`
|
|
`<details>`/`<summary>` UI fixes
With images it's easier to understand:


The headings in `<summary>` should not have bottom border so I removed it as well alongside the other fixes.
r? `@jsha`
|
|
On desktop, if you open the source code sidebar, it stays open even when you
move from page to page. It used to do the same thing on mobile, but I think
that's stupid. Since the file list fills the entire screen on mobile, and you
can't really do anything with the currently selected file other than dismiss
the "sidebar" to look at it, it's safe to assume that anybody who clicks a
file in that list probably wants the list to go away so they can see it.
|