| Age | Commit message (Collapse) | Author | Lines |
|
Based on
https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119
Having them in separate files used to make more sense, before the
migration to CSS variables made the theme files as small as they are
nowadays. This is already how docs.rs and mdBook do it.
|
|
|
|
|
|
The CSS uses an inconsistent mix of both. This commit switches
it to always use `src`.
|
|
This is very dependent on subjectivity and what screen you use,
but this change makes the radio buttons' outer circle less ugly.
This is because I could see the pixels very clearly, thanks to the
very thin line and high contrast. This change makes both less
severe, giving your browser's antialiasing algorithm more to
work with. Since it's thicker, lowering the contrast shouldn't
impact visibility.
|
|
|
|
r=GuillaumeGomez
rustdoc: merge doctest tooltip with notable traits tooltip
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000
<details><summary>a user report where the tooltip arrow overlaps the text</summary>

</details>
Fixes #91100
Preview: <https://notriddle.com/notriddle-rustdoc-demos/simplify-doctest-tooltip/std/vec/struct.Vec.html#indexing>
Screenshot:

|
|
|
|
|
|
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000
Fixes #91100
|
|
|
|
|
|
|
|
|
|
|
|
Migrate toggle-line-inner background to CSS variable
r? `@notriddle`
|
|
|
|
Discussed in
https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling
|
|
|
|
|
|
|
|
No content is set, so this pseudo-element does not exist. The CSS was
obsoleted by 73d0f7c7b68784f1db0a1f53855c20d118a7e8b0.
|
|
* They all get rounded corners now. A test case has been added for this, too.
* There are now broadly two kinds of stability badge, where there used to be
three: item-info "fat badge", and the "thin badge" in both item tables and
in docblocks (which got merged). The fat badges can have icons, while the
thin badges can't.
|
|
* The rule `display: block` had no noticeable effect. Technically, because
markdown tables have a tbody and thead, they get wrapped in an [anonymous
table box] in the CSS tree, nested within the `<table>` element's block
layout box.
This rule was added in #87230 to make the table side-scrolling, but
this same issue was doubly fixed in #88742 by wrapping it in an explicit
`<div>` tag. Since accessibility advocates recommend the wrapper div over
marking the table as `display: block`, we'll stick with that.
https://adrianroselli.com/2020/11/under-engineered-responsive-tables.html
* The rule `width: calc(100% - 2px)` had no visible effect, because the
anonymous table box was not affected.
* The style is tweaked to basically be the same style GitHub uses.
In particular, it adds zebra stripes, and removes dotted borders.
[anonymous table box]: https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes
|
|
|
|
|
|
|
|
|
|
r=notriddle
Migrate top buttons style to CSS variables
No UI changes.
r? `@notriddle`
|
|
|
|
|
|
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: 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
|
|
|
|
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
|
|
|
|
|
|
|
|
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``
|
|
|
|
|
|
|
|
This allows you to open the help section in a new browser tab, which is a
pretty reasonable thing to want for a documentation page.
|
|
GuillaumeGomez:migrate-css-highlight-without-change, r=notriddle
Migrate css highlight without change
This is a "previous" version of https://github.com/rust-lang/rust/pull/102663: only migrating to CSS variables, no changes. It's a bit more verbose because rules are not coherent between themes.
r? ``@notriddle``
|
|
Since 98f05a0282625a5fda6e90ebf3b05a4bd7608f65 and
b5963f07e611cf2a09a310eb74c1a93adfaeb9de removed color classes from sidebar
items, there's no need for the selectors to be so specific any more.
This commit does have to change `h1.fqn a` to just be `h1 a`, so that the
header link color selector is less specific than the typed link at the end.
Since #89506 made docblocks start at `h2`, the main page link header should
be the only h1 in the page now.
|
|
|
|
|
|
|