| Age | Commit message (Collapse) | Author | Lines |
|
This CSS was added in dc2c9723343c985740be09919236a6e96c4e4433,
before 6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c when the sidebars
were merged.
Now that they are merged, the source sidebar is being pushed
off-screen anyway, so giving it zero width doesn't do much.
|
|
rustdoc: remove legacy user-select CSS
According to [caniuse], the only supported browser that requires the vendor prefix, as defined in [RFC 1985], is Safari.
* The last version of Chrome that required a vendor prefix was version 53. The current version is 108.
* Firefox 68 is the last version that required a vendor prefix. The [current Firefox ESR] is version 102.
* The current version of Safari for Mac and iOS still requires a prefix.
* The last version of Edge that required a vendor frefix was 18. The current version of Edge is 108.
* UCAndroid support is unknown, but if it still requires a vendor prefix, it's more likely to be `-webkit-` than `-moz-` or `-ms-`, since they would want to emulate iOS for compatibility.
[caniuse]: https://caniuse.com/?search=user-select
[RFC 1985]: https://rust-lang.github.io/rfcs/1985-tiered-browser-support.html
[current Firefox ESR]: https://wiki.mozilla.org/Releases
|
|
According to [caniuse], the only supported browser that requires the vendor prefix,
as defined in [RFC 1985], is Safari.
* The last version of Chrome that required a vendor prefix was version 53.
The current version is 108.
* Firefox 68 is the last version that required a vendor prefix. The
[current Firefox ESR] is version 102.
* The current version of Safari for Mac and iOS still requires a prefix.
* The last version of Edge that required a vendor frefix was 18. The current
version of Edge is 108.
* UCAndroid support is unknown, but if it still requires a vendor prefix,
it's more likely to be `-webkit-` than `-moz-` or `-ms-`, since they
would want to emulate iOS for compatibility.
[caniuse]: https://caniuse.com/?search=user-select
[RFC 1985]: https://rust-lang.github.io/rfcs/1985-tiered-browser-support.html
[current Firefox ESR]: https://wiki.mozilla.org/Releases
|
|
Fix --kbd-color variable name in rustdoc.css
Interestingly enough, it only impacted the dark theme.
Before:

After:

r? `@notriddle`
|
|
|
|
This commit changes `.sidebar a:hover:not(.logo-container)` to add the `:not()` pseudo-class, retaining the old appearance of the logo when mousing over it.
This didn't used to be necessary because the `a.sidebar-logo` was `display:inline`, and was what got the `background` changed on hover, while the `div.logo-container` inside it was `display:block`. This resulted in the hover rule not having any effect, because the logo-container box was not actually nested inside the sidebar-logo box:
https://www.w3.org/TR/CSS2/visuren.html#anonymous-block-level
> When an inline box contains an in-flow block-level box, the inline box (and its inline ancestors within the same line box) are broken around the block-level box (and any block-level siblings that are consecutive or separated only by collapsible whitespace and/or out-of-flow elements), splitting the inline box into two boxes (even if either side is empty), one on each side of the block-level box(es). The line boxes before the break and after the break are enclosed in anonymous block boxes, and the block-level box becomes a sibling of those anonymous boxes. When such an inline box is affected by relative positioning, any resulting translation also affects the block-level box contained in the inline box.
|
|
r=GuillaumeGomez
rustdoc: remove legacy font-feature-settings CSS
According to [caniuse], these vendor prefixes aren't needed in any supported web browsers as defined in [RFC 1985].
* The last version of Chrome that required a vendor prefix was version 47. The current version is 108.
* Firefox 33 is the last version that required a vendor prefix. The [current Firefox ESR] is version 102.
* The last version of Safari that required a vendor prefix was version 9.1. The current version is 16.
* The last version of Safari/iOS that required a vendor prefix was version 9.3. The current version is 16.
* Edge never required vendor prefixes.
* UCAndroid never required vendor prefixes.
[caniuse]: https://caniuse.com/?search=font-feature-settings
[RFC 1985]: https://rust-lang.github.io/rfcs/1985-tiered-browser-support.html
[current Firefox ESR]: https://wiki.mozilla.org/Releases
|
|
According to [caniuse], these vendor prefixes aren't needed in any supported
web browsers as defined in [RFC 1985].
* The last version of Chrome that required a vendor prefix was version 47.
The current version is 108.
* Firefox 33 is the last version that required a vendor prefix. The
[current Firefox ESR] is version 102.
* The last version of Safari that required a vendor prefix was version 9.1.
The current version is 16.
* The last version of Safari/iOS that required a vendor prefix was version
9.3. The current version is 16.
* Edge never required vendor prefixes.
* UCAndroid never required vendor prefixes.
[caniuse]: https://caniuse.com/?search=font-feature-settings
[RFC 1985]: https://rust-lang.github.io/rfcs/1985-tiered-browser-support.html
[current Firefox ESR]: https://wiki.mozilla.org/Releases
|
|
According to [caniuse], these vendor prefixes aren't needed in any
supported web browsers as defined in [RFC 1985]
* The last version of Chrome that required a vendor prefix was version 9.
The current version is 108.
* Firefox 28 is the last version that required a vendor prefix. The
[current Firefox ESR] is version 102.
* The last version of Safari that required a vendor prefix was version 5.
The current version is 16.
* The last version of Safari/iOS that required a vendor prefix was version 4.
The current version is 16.
* Edge never required vendor prefixes.
* UCAndroid never required vendor prefixes.
[caniuse]: https://caniuse.com/?search=box-sizing
[RFC 1985]: https://rust-lang.github.io/rfcs/1985-tiered-browser-support.html
[current Firefox ESR]: https://wiki.mozilla.org/Releases
|
|
rustdoc: use the regular arrow indicator for dir-entry CSS
This mostly reverts 468acca108e65101b802821bded17149dc1d86c9, while still fixing the problem it fixed by using an internal list-style-position. It results in a slight change in the hover indicator, but nothing misleading.
Preview: http://notriddle.com/notriddle-rustdoc-demos/dir-entry/src/std/lib.rs.html
## Before

## After

|
|
rustdoc: merge scrape-help CSS
|
|
This mostly reverts 468acca108e65101b802821bded17149dc1d86c9, while still
fixing the problem it fixed by using an internal list-style-position. It
results in a slight change in the hover indicator, but nothing misleading.
|
|
|
|
r=GuillaumeGomez
rustdoc: remove redundant CSS `.source .content { overflow: visible }`
When added in 7669f04fb0ddc3d71a1fb44dc1c5c00a6564ae99 / #16066, the page itself was set to scroll. Now it's set so that the `example-wrap` is scrolling inside the page, so the overflow setting for the content is irrelevant.
|
|
r=notriddle
Migrate more scraped examples CSS rules to CSS variables
It's based on https://github.com/rust-lang/rust/pull/106218 so it will need to wait for it to be merged first.
r? `@notriddle`
|
|
When added in 7669f04fb0ddc3d71a1fb44dc1c5c00a6564ae99 / #16066, the page
itself was set to scroll. Now it's set so that the `example-wrap` is
scrolling inside the page, so the overflow setting for the content is
irrelevant.
|
|
Rollup of 9 pull requests
Successful merges:
- #104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params)
- #105899 (`./x doc library --open` opens `std`)
- #106190 (Account for multiple multiline spans with empty padding)
- #106202 (Trim more paths in obligation types)
- #106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing)
- #106236 (docs/test: add docs and a UI test for `E0514` and `E0519`)
- #106259 (Update Clippy)
- #106260 (Fix index out of bounds issues in rustdoc)
- #106263 (Formatter should not try to format non-Rust files)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=notriddle
Migrate css var scraped examples
r? ``@notriddle``
|
|
rustdoc: remove unnecessary `.tooltip::after { text-align: center }`
This doesn't have an effect, since these tooltip are only one line anyway.
|
|
|
|
Since there remains only one common CSS rule shared between them, there's
no point to it: the block and selector costs more than the single `width`
rule saves.
|
|
This doesn't have an effect, since these tooltip are only one line anyway.
|
|
|
|
|
|
This PR makes the `464px` version of `#src-sidebar-toggle` the same as the
`700px` version, with the button lower on the page so that it doesn't cover
up the search form, and removes the left margin to make space for it.
|
|
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
|
|
r=GuillaumeGomez
rustdoc: remove no-op CSS from `.docblock-short`
The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead.
These rules definitely became obsolete by https://github.com/rust-lang/rust/pull/77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.
|
|
The rules `overflow:hidden` and `text-overflow:ellipses` only have an
effect if overflow occurs, which cannot happen because it will just line
wrap instead.
These rules definitely became obsolete by
https://github.com/rust-lang/rust/pull/77699, when the stylesheet was
decidedly changed to have line wrapping in short docblocks, but given the
bug it was fixing, this probably got broken earlier.
|
|
This renames the ID, which is only used in search results, to
`#search-tabs`. Also changes the `.count` to a span, so it doesn't need its
display mode to be overridden.
|
|
GuillaumeGomez:migrate-css-var-search-tab-title-color, r=notriddle
Migrate search tab title color to CSS variable
r? ```@notriddle```
|
|
|
|
This gets rid of the more-scraped-examples-inner wrapper, instead nesting the
children directly and using absolute positioning for the toggle line.
|
|
rustdoc: simplify section anchor CSS
Since f50bf8636e3b0296db82e631fe95c84324a46ccc changed anchors to be always positioned absolute, specifying it on hover as well is redundant.
|
|
Since f50bf8636e3b0296db82e631fe95c84324a46ccc changed anchors to be
always positioned absolute, specifying it on hover as well is redundant.
|
|
|
|
r=notriddle
rustdoc: Simplify CSS for scraped code examples code blocks
It's another approach than https://github.com/rust-lang/rust/pull/105894 for https://github.com/rust-lang/rust/pull/105823.
I simply removed the extra style added for the scraped code blocks which appears to be unneeded.
r? `@notriddle`
|
|
rustdoc: force pre tags to have the default line height
Fixes #105906
|
|
|
|
|
|
Fixes #105906
|
|
rustdoc: clean up margin CSS for scraped examples
* This stops applying a margin to the additional example links. Because these links are `display: inline`, it doesn't actually do anything.
* This switches from using a margin-bottom with a special exception for the examples themselves, plus an additional margin on the hide button, to instead using just margin-top on the examples, with an exception for the first one.
No user-visible changes should result from this.
|
|
* This stops applying a margin to the additional example links.
Because these links are `display: inline`, it doesn't actually do anything.
* This switches from using a margin-bottom with a special exception for
the examples themselves, plus an additional margin on the hide button,
to instead using just margin-top on the examples, with an exception for
the first one.
No user-visible changes should result from this.
|
|
r=GuillaumeGomez
rustdoc: name the source page sidebar-toggle `#src-sidebar-toggle`
The old name doesn't get across where it's really supposed to be used.
|
|
r=GuillaumeGomez
rustdoc: simplify CSS for codeblock tooltips
Instead of making its parts `display: none` and then changing it on hover, just make the pseudo-element itself on hover.
|
|
The old name doesn't get across where it's really supposed to be used.
|
|
Instead of making its parts `display: none` and then changing it on hover,
just make the pseudo-element itself on hover.
|
|
|
|
notriddle:notriddle/scrape-example-src-line-numbers, r=GuillaumeGomez
rustdoc: remove no-op CSS `.scrape-example .src-line-numbers { margin: 0 }`
This is the default CSS for `<pre>` tags in `.code-wrapper` anyway, so this line does nothing.
|