about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2022-10-15rustdoc: remove unused HTML class `sidebar-title`Michael Howell-7/+1
Since 6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c, this class is no longer styled.
2022-10-15Fix display of settings pageGuillaume Gomez-1/+3
2022-10-14Rollup merge of #103025 - notriddle:notriddle/search-container-star, ↵Dylan DPC-3/+0
r=GuillaumeGomez rustdoc: remove unused CSS `.search-container > *` The two items it was really intended to target were the buttons, and those both need to have the style set directly on them anyway because the buttons are both child elements of wrappers. https://github.com/rust-lang/rust/blob/6b3ede3f7bc502eba7bbd202b4b9312d812adcd7/src/librustdoc/html/static/css/rustdoc.css#L1406-L1411
2022-10-14Rollup merge of #103018 - Rageking8:more-dupe-word-typos, r=TaKO8KiDylan DPC-1/+1
More dupe word typos I only picked those changes (from the regex search) that I am pretty certain doesn't change meaning and is just a typo fix. Do correct me if any fix is undesirable and I can revert those. Thanks.
2022-10-14Rollup merge of #102914 - ↵Dylan DPC-54/+89
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``
2022-10-14more dupe word typosRageking8-1/+1
2022-10-13rustdoc: remove unused CSS `.search-container > *`Michael Howell-3/+0
The two items it was really intended to target were the buttons, and those both need to have the style set directly on them anyway because the buttons are both child elements of wrappers.
2022-10-13Rollup merge of #102980 - notriddle:notriddle/content, r=GuillaumeGomezYuki Okushi-6/+3
rustdoc: merge separate `.item-info` CSS Rough timeline: * The longer `.content .item-info` selector originated in 110e7270ab7b0700ce714b8b1c7e509195dea2c4. No reason seems to be given in the PR why it needed the `.content` part, but it was probably added because of <https://github.com/rust-lang/rust/blob/110e7270ab7b0700ce714b8b1c7e509195dea2c4/src/librustdoc/html/static/rustdoc.css#L476-L478>. That selector with the margin-bottom was removed when CSS containment was added in 8846c0853d8687fda0e5f23f6687b03b243980ee. * `.stability` was renamed `.item-info` in caf6c5790a858893c1d32ed2054c9577d12e7493. * The selector without the `.content` was added in d48a39a5e24ab08f727d1c919dc2af98c333ad14.
2022-10-12rustdoc: merge separate `.item-info` CSSMichael Howell-6/+3
Rough timeline: * The longer `.content .item-info` selector originated in 110e7270ab7b0700ce714b8b1c7e509195dea2c4. No reason seems to be given in the PR why it needed the `.content` part, but it was probably added because of <https://github.com/rust-lang/rust/blob/110e7270ab7b0700ce714b8b1c7e509195dea2c4/src/librustdoc/html/static/rustdoc.css#L476-L478>. That selector with the margin-bottom was removed when CSS containment was added in 8846c0853d8687fda0e5f23f6687b03b243980ee. * `.stability` was renamed `.item-info` in caf6c5790a858893c1d32ed2054c9577d12e7493. * The selector without the `.content` was added in d48a39a5e24ab08f727d1c919dc2af98c333ad14.
2022-10-12Rollup merge of #102936 - notriddle:notriddle/nav-sum, r=Dylan-DPCDylan DPC-3/+0
rustdoc: remove unused CSS `nav.sum` This was added in 4fd061c426902b0904c65e64a3780b21f9ab3afb, but never actually used.
2022-10-11rustdoc: merge identical CSS selectorsMichael Howell-2/+0
2022-10-11rustdoc: remove unused CSS `nav.sum`Michael Howell-1/+0
This was added in 4fd061c426902b0904c65e64a3780b21f9ab3afb, but never actually used.
2022-10-11rustdoc: remove unneeded `.content` selector from link colorsMichael Howell-28/+28
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.
2022-10-11rustdoc: remove unused classes from sidebarMichael Howell-5/+3
Since 98f05a0282625a5fda6e90ebf3b05a4bd7608f65 removed separate colors from the currently-selected item, there's no need to have item classes on sidebar links.
2022-10-11Rollup merge of #102898 - notriddle:notriddle/sidebar-block, r=GuillaumeGomezYuki Okushi-34/+21
rustdoc: remove unneeded `<div>` wrapper from sidebar DOM When this was added, the sidebar had a bit more complex style. It can be removed, now. Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-block/std/index.html
2022-10-11Migrate highlight style to CSS variablesGuillaume Gomez-54/+89
2022-10-10Remove outdated commentMichael Howell-1/+0
2022-10-10rustdoc: remove unneeded `<div>` wrapper from sidebar DOMMichael Howell-33/+21
When this was added, the sidebar had a bit more complex style. It can be removed, now.
2022-10-09rustdoc: clean up overly complex `.trait-impl` CSS selectorsMichael Howell-3/+1
When added in 45964368f4a2e31c94e9bcf1cef933c087d21544, these multi-class selectors were present in the initial commit, but no reason was given why the shorter selector wouldn't work.
2022-10-10Rollup merge of #102799 - rol1510:issue-100421-fix, r=notriddleYuki Okushi-1/+22
rustdoc: remove hover gap in file picker Fixes #100421 Before: <img width="385" alt="image" src="https://user-images.githubusercontent.com/29011024/194677087-fda2db3e-126d-47cf-8152-c554e3c25a54.png"> After: <img width="388" alt="image" src="https://user-images.githubusercontent.com/29011024/194676774-7a50ace9-4060-492e-849a-ad85d9132630.png"> longe module names also wrap nicely: <img width="389" alt="image" src="https://user-images.githubusercontent.com/29011024/194678516-f2497b3a-8d50-439b-9d69-3fa9fb43b84d.png"> Also if you zoom out very far, the arrows did move to the left, in relation to the text below. This is now also fixed. <img width="818" alt="image" src="https://user-images.githubusercontent.com/29011024/194677652-cfdf129d-f5db-4f26-ac3c-3d0853e89619.png"> CSS doesn't have a lot of controll over the `::marker` element, so now the `::after` element is used to draw the arrows. Now the whole line is clickable wihtout gaps.
2022-10-09rustdoc: fix file picker marker renders twice on iosRoland Strasser-0/+5
2022-10-08Rollup merge of #102818 - rust-lang:clean-up-highlight-impots, r=UrgauMichael Howell-4/+2
Clean up rustdoc highlight.rs imports a bit r? `@Dylan-DPC`
2022-10-08Rollup merge of #102815 - notriddle:notriddle/mobile-topbar, r=GuillaumeGomezMatthias Krüger-10/+10
rustdoc: remove mobile topbar from source pages instead of hiding it
2022-10-08Clean up rustdoc highlight.rs imports a bitGuillaume Gomez-4/+2
2022-10-08rustdoc: remove weird `<a href="#">` wrapper around unsafe triangleMichael Howell-1/+1
This DOM cleanup changes the color of the triangle, from blue to black, but since it's still a different color from the link it's next to, it should still be noticeable.
2022-10-08rustdoc: remove mobile topbar from source pages instead of hiding itMichael Howell-10/+10
2022-10-08Rollup merge of #102798 - notriddle:notriddle/text-decoration-underline, ↵Matthias Krüger-7/+2
r=GuillaumeGomez rustdoc: add main-heading and example-wrap link CSS to big selector This makes the stylesheet more consistent about how it handles link hover.
2022-10-07rustdoc: add main-heading and example-wrap link CSS to big selectorMichael Howell-7/+2
This makes the stylesheet more consistent about how it handles link hover.
2022-10-07rustdoc: remove no-op CSS `.rightside { position: initial }`Michael Howell-1/+0
This CSS, added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, overrode CSS that was applied to the `.since` class: https://github.com/rust-lang/rust/blob/34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9/src/librustdoc/html/static/rustdoc.css#L782-L795 The absolute positioning for `.since` was abandoned in favor of always floating it, so this is no longer needed: https://github.com/rust-lang/rust/commit/5de1391b88007a1d4f7b1517657a86aae352af1e#diff-7dc22a0530802d77c2f2ec9e834024a5657b6eab4055520fca46edc99a544413L902-L904
2022-10-08rustdoc: remove hover gap in file pickerRoland Strasser-1/+17
2022-10-07Rollup merge of #102747 - notriddle:notriddle/docblock-a-not-srclink, ↵Matthias Krüger-2/+3
r=GuillaumeGomez rustdoc: remove unused CSS `.docblock a:not(.srclink)` This selector was added in c7312fbae4979c6d4fdfbd1f55a71cd47d82a480, because the list of impl items could be nested below `docblock`. https://github.com/rust-lang/rust/blob/c7312fbae4979c6d4fdfbd1f55a71cd47d82a480/src/librustdoc/html/render.rs#L3841-L3845 Now that rustdoc toggles have been switched to `<details>`, there shouldn't be any need to put things inside docblock containers just to give them disclosure toggles.
2022-10-07Rollup merge of #102744 - notriddle:notriddle/content-item-list, ↵Matthias Krüger-9/+4
r=GuillaumeGomez rustdoc: remove unused CSS `.content .item-list` When these rules were added in 4fd061c426902b0904c65e64a3780b21f9ab3afb (yeah, that's the very first commit of rustdoc_ng), `.item-list` was a `<ul>`, and this would override the default style for that tag. In c1b1d6804bfce1aee3a95b3cbff3eaeb15bad9a4, it was changed to use a `<div>` tag, so these rules are both no-ops.
2022-10-06rustdoc: remove unused CSS `.docblock a:not(.srclink)`Michael Howell-2/+3
This selector was added in c7312fbae4979c6d4fdfbd1f55a71cd47d82a480, because the list of impl items could be nested below `docblock`. https://github.com/rust-lang/rust/blob/c7312fbae4979c6d4fdfbd1f55a71cd47d82a480/src/librustdoc/html/render.rs#L3841-L3845 Now that rustdoc toggles have been switched to `<details>`, there shouldn't be any need to put things inside docblock containers just to give them disclosure toggles.
2022-10-06rustdoc: remove unused HTML `class="item-list"`Michael Howell-4/+4
Since 50f662e99ec372a3c9558876d4164e8665859217, there is no CSS or JS targeting this class.
2022-10-06rustdoc: remove unused CSS `.content .item-list`Michael Howell-5/+0
When these rules were added in 4fd061c426902b0904c65e64a3780b21f9ab3afb (yeah, that's the very first commit of rustdoc_ng), `.item-list` was a `<ul>`, and this would override the default style for that tag. In c1b1d6804bfce1aee3a95b3cbff3eaeb15bad9a4, it was changed to use a `<div>` tag, so these rules are both no-ops.
2022-10-06Rollup merge of #102736 - GuillaumeGomez:search-input-color, r=notriddleMatthias Krüger-8/+4
Migrate search input color to CSS variable Part of https://github.com/rust-lang/rust/pull/98460. No UI changes. r? `@notriddle`
2022-10-06Migrate search input color to CSS variableGuillaume Gomez-8/+4
2022-10-06Auto merge of #102707 - ↵bors-1/+2
fmease:rustdoc-render-more-cross-crate-hrtbs-properly, r=GuillaumeGomez rustdoc: render more cross-crate HRTBs properly Follow-up to #102439. Render the `for<>` parameter lists of cross-crate higher-rank trait bounds (in where-clauses and in `impl Trait`). I've added a new field `bound_params` to `clean::WherePredicate::EqPredicate` (mirroring its sibling variant `BoundPredicate`). However, I had to box the existing fields since `EqPredicate` used to be the largest variant (128 bytes on 64-bit systems) and it would only have gotten bigger). Not sure if you like that approach. As an alternative, I could pass the uncleaned `ty::Predicate` alongside the cleaned `WherePredicate` to the various re-sugaring methods (similar to what `clean::AutoTraitFinder::param_env_to_generics` does). I haven't yet added the HTML & JSON rendering code for the newly added `bound_params` field since I am waiting for your opinion. Those two rendering code paths should actually be unreachable in practice given we re-sugar all(?) equality predicates to associated type bindings (and arbitrary equality predicates are not part of the Rust surface language at the time of this writing). If you agree with storing `bound_params` in `EqPredicate`, I think I can use it to greatly simplify the `clean::auto_trait` module (by also using `simplify::merge_bounds`). Maybe I can do that in any case though. `@rustbot` label T-rustdoc A-cross-crate-reexports r? `@GuillaumeGomez`
2022-10-05rustdoc: remove unused CSS class `in-band`Michael Howell-43/+25
Since a7c25b29575c17434406b69773f8c2961af343b3 removed `in-band` from code headers, the only remaining uses of the `in-band` class are: https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/write_shared.rs#L520-L521 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/templates/print_item.html#L2-L3 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/context.rs#L637-L638 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/mod.rs#L368-L369 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/mod.rs#L401-L402 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/static/js/main.js#L525 Since all of these uses are nested below `h1.fqn`, we can get rid of it, and the support code that was used for when `in-band` was part of item rendering.
2022-10-05rustdoc: render more cross-crate hrtbs properlyLeón Orell Valerian Liehr-1/+2
2022-10-05Rollup merge of #102699 - GuillaumeGomez:fix-hamburger-button-color, r=Dylan-DPCDylan DPC-0/+1
Fix hamburger button color Before: ![Screenshot from 2022-10-05 11-14-20](https://user-images.githubusercontent.com/3050060/194026621-e4df5750-92df-4194-a163-9787b45ace26.png) After: ![Screenshot from 2022-10-05 11-14-15](https://user-images.githubusercontent.com/3050060/194026618-6a365623-5181-4174-b6af-66962e5ba6a5.png) No need to backport it, beta doesn't seem affected. r? `@notriddle`
2022-10-05Fix hamburger button color in mobile sidebarGuillaume Gomez-0/+1
2022-10-04rustdoc: remove no-op CSS `.code-header { display: block }`Michael Howell-4/+0
Since 76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30 converted code headers to real headers, `display: block` is now the default.
2022-10-04Rollup merge of #102624 - notriddle:notriddle/summary-before, r=GuillaumeGomezMatthias Krüger-4/+0
rustdoc: remove font family CSS on `.rustdoc-toggle summary::before` This rule became irrelevant since c58246efe47bea09d4f3e70f536e4c9bb7770749 made it so that the `summary::before` pseudo-element contains an SVG instead of text.
2022-10-03Migrate search results theme style to CSS variablesGuillaume Gomez-84/+8
2022-10-03Rollup merge of #102620 - GuillaumeGomez:css-stab-migration, r=notriddleMatthias Krüger-20/+13
Migrate `.stab` elements style to CSS variables Part of https://github.com/rust-lang/rust/pull/98460. There should be no UI changes. r? `@notriddle`
2022-10-03rustdoc: remove font family CSS on `.rustdoc-toggle summary::before`Michael Howell-4/+0
This rule became irrelevant since c58246efe47bea09d4f3e70f536e4c9bb7770749 made it so that the `summary::before` pseudo-element contains an SVG instead of text.
2022-10-03Migrate stab elements style to CSS variablesGuillaume Gomez-20/+13
2022-10-03Rollup merge of #102550 - notriddle:notriddle/impl, r=GuillaumeGomezMatthias Krüger-12/+0
rustdoc: remove no-op CSS on `.impl, .method` etc Preview: http://notriddle.com/notriddle-rustdoc-demos/impl/index.html # `flex-basis: 100%` When `.impl-items { flex-basis: 100% }` and `h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant` were added in https://github.com/rust-lang/rust/commit/34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, it seems like it was a mistake even then. According to MDN, [flex-basis] does nothing unless the box it's applied to is a flex *item*, a child of a flex container. However, when this was added, these elements were flex containers themselves. [flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis # `position: relative` This property was added to help with positioning the `[+]/[-]` toggle. It is no longer necessary, because `details.rustdoc-toggle` already has `position:relative` set on it.
2022-10-02Rollup merge of #102525 - notriddle:notriddle/array-link, r=GuillaumeGomez,jshaMatthias Krüger-8/+18
rustdoc: remove orphaned link on array bracket This is #98069, but for arrays instead. For non-generics, this retains links to the array page, but instead of trying to link it all, it only links the length part, which distinguishes arrays from slices. For generics, the entire thing becomes a link, just like slices. | Type | Before | After | |--|--|--| | u32 | <code>pub fn alpha() -&gt; &amp;'static <a class="primitive" href="http://doc.rust-lang.org/nightly/core/primitive.array.html">[</a><a class="primitive" href="http://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a><a class="primitive" href="http://doc.rust-lang.org/nightly/core/primitive.array.html">; 1]</a></code> | <code>pub fn alpha() -&gt; &amp;'static [<a class="primitive" href="http://doc.rust-lang.org/nightly/core/primitive.u32.html">u32</a>; <a class="primitive" href="http://doc.rust-lang.org/nightly/core/primitive.array.html">1</a>]</code> | generic | <code>pub fn beta&lt;T&gt;() -&gt; &amp;'static <a class="primitive" href="http://doc.rust-lang.org/nightly/core/primitive.array.html">[</a>T<a class="primitive" href="http://doc.rust-lang.org/nightly/core/primitive.array.html">; 1]</a></code> | <code>pub fn beta&lt;T&gt;() -&gt; &amp;'static <a class="primitive" href="http://doc.rust-lang.org/nightly/core/primitive.array.html">[T; 1]</a></code>