about summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
2022-11-22Rollup merge of #104666 - GuillaumeGomez:migrate-alias-search-result, ↵Matthias Krüger-24/+16
r=notriddle Migrate alias search result to CSS variables r? `@notriddle`
2022-11-21Migrate search result alias to CSS variablesGuillaume Gomez-24/+16
2022-11-20rustdoc: factor out common button CSSMichael Howell-8/+4
2022-11-20Rollup merge of #104581 - notriddle:notriddle/js-iife-2, r=GuillaumeGomezMatthias Krüger-6/+3
rustdoc: remove unused JS IIFE from main.js This [IIFE] made sense when it was added in deaf5e200e79a75ac57d3f0952f6758a38168e52 and there was a local variable scoped to it, but now it calls a function, but declares nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2022-11-20Rollup merge of #104640 - GuillaumeGomez:migrate-kdb-css, r=notriddleMatthias Krüger-18/+12
Migrate kdb style to CSS variables r? `@notriddle`
2022-11-20Rollup merge of #104611 - notriddle:notriddle/scrape-examples-button, ↵Matthias Krüger-0/+6
r=GuillaumeGomez rustdoc: use real buttons for scrape examples controls This makes the expand and switch controls keyboard-accessible. Preview: https://notriddle.com/notriddle-rustdoc-demos/scrape-examples-button/test_dingus/fn.test.html
2022-11-20Migrate kdb colors to CSS variablesGuillaume Gomez-18/+12
2022-11-19rustdoc: use real buttons for scrape examples controlsMichael Howell-0/+6
2022-11-19Rollup merge of #104604 - GuillaumeGomez:migrate-top-button-to-css-var, ↵Matthias Krüger-27/+12
r=notriddle Migrate top buttons style to CSS variables No UI changes. r? `@notriddle`
2022-11-19Rollup merge of #104577 - GuillaumeGomez:remove-focus-on-blur, r=notriddleMatthias Krüger-9/+11
Don't focus on notable trait parent when hiding it I clicked on a notable trait icon so the popup remained and then clicked on the settings menu. When the settings menu was blurred, it scrolled back to when the notable trait was, which isn't great. r? `@notriddle`
2022-11-19Migrate top buttons style to CSS variablesGuillaume Gomez-27/+12
2022-11-19Fix invalid focus when blurring notable traits popoverGuillaume Gomez-8/+11
2022-11-18Auto merge of #104591 - Manishearth:rollup-b3ser4e, r=Manishearthbors-9/+3
Rollup of 8 pull requests Successful merges: - #102977 (remove HRTB from `[T]::is_sorted_by{,_key}`) - #103378 (Fix mod_inv termination for the last iteration) - #103456 (`unchecked_{shl|shr}` should use `u32` as the RHS) - #103701 (Simplify some pointer method implementations) - #104047 (Diagnostics `icu4x` based list formatting.) - #104338 (Enforce that `dyn*` coercions are actually pointer-sized) - #104498 (Edit docs for `rustc_errors::Handler::stash_diagnostic`) - #104556 (rustdoc: use `code-header` class to format enum variants) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-18Rollup merge of #104556 - notriddle:notriddle/variant, r=GuillaumeGomezManish Goregaokar-9/+3
rustdoc: use `code-header` class to format enum variants The font size and weights should be exactly the same after this PR, but the spacing is changed to be the same as methods. Preview: http://notriddle.com/notriddle-rustdoc-demos/variant/test_dingus_enum/enum.TestEnum.html
2022-11-18rustdoc: remove unused JS IIFE from main.jsMichael Howell-6/+3
This [IIFE] made sense when it was added in deaf5e200e79a75ac57d3f0952f6758a38168e52 and there was a local variable scoped to it, but now it calls a function, but declares nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2022-11-18Rollup merge of #104516 - notriddle:notriddle/flex-basis-sidebar-width, ↵Matthias Krüger-9/+4
r=GuillaumeGomez rustdoc: clean up sidebar width CSS This commit takes advantage of the ability to set [flex-basis] to a specific length instead of setting it to `auto` and changing min-/max-width, and setting flex-grow/-shrink both to 0. This PR should not cause any visual changes. preview: https://notriddle.com/notriddle-rustdoc-demos/flex-basis-sidebar-width/std/index.html [flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
2022-11-18Don't focus on notable trait parent when hiding itGuillaume Gomez-1/+0
2022-11-17rustdoc: use `code-header` class to format enum variantsMichael Howell-9/+3
The font size and weights should be exactly the same after this commit, but the spacing is changed to be exactly the same as methods.
2022-11-17Rollup merge of #104532 - GuillaumeGomez:migrate-tooltip-css, r=notriddleMatthias Krüger-31/+11
Migrate tooltip style to CSS variables
2022-11-17Rollup merge of #104503 - notriddle:notriddle/where, r=GuillaumeGomezMatthias Krüger-4/+1
rustdoc: remove redundant font-color CSS on `.where` Before 7f6ce7dddd49f453da15bb4d586a5990985814d8, light-theme where clauses had color `#4E4C4C` while the main color was `#000`. One of that commit's simplifications made it so that everything used the same black.
2022-11-17Rollup merge of #104366 - GuillaumeGomez:simplify-settings-theme-choice, ↵Matthias Krüger-24/+36
r=notriddle Simplify settings theme choice I removed the storage changes from https://github.com/rust-lang/rust/pull/98765 and only kept the UI changes. You can test it [here](https://rustdoc.crud.net/imperio/simplify-settings-theme-choice/foo/index.html). Discussion about this still in progress [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Last.20part.20of.20settings.20simplification). r? ````@notriddle````
2022-11-17Migrate tooltip style to CSS variablesGuillaume Gomez-31/+11
2022-11-16rustdoc: clean up sidebar width CSSMichael Howell-9/+4
This commit takes advantage of the ability to set [flex-basis] to a specific length instead of setting it to `auto` and changing min-/max-width, and setting flex-grow/-shrink both to 0. [flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
2022-11-16rustdoc: remove redundant font-color CSS on `.where`Michael Howell-4/+1
Before 7f6ce7dddd49f453da15bb4d586a5990985814d8, light-theme where clauses had color `#4E4C4C` while the main color was `#000`. One of that commit's simplifications made it so that everything used the same black.
2022-11-16Rollup merge of #104466 - notriddle:notriddle/crate-search-div-display, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `#crate-search-div { display: inline-block }` `#crate-search-div` is nested directly below `.search-results-title`, which has `display: inline-flex`. This makes the crate-search-div a [flex item], which makes its display property irrelevant, because flex items have their display [blockified] in any case. [flex item]: https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item [blockified]: https://www.w3.org/TR/css-flexbox-1/#flex-items
2022-11-16Rollup merge of #104462 - notriddle:notriddle/rightside-padding-right, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove pointless CSS `.rightside { padding-right: 2px }` This CSS was added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, as `.since { padding-right: 2px }`, to prevent it from uncomfortably touching the srclink, which were separate floated elements. It was carried forward with 962c0a4ee59e3c1a2413e785694c9433ffd0a9e1 to the new `.rightside`, but its role was replaced with adding " • " between them. All it does now is pushes the element 2px away from the page's right margin. Removing this rule changes the page layout, but you have to look for it to notice it.
2022-11-16Rollup merge of #104459 - notriddle:notriddle/main-js-iife, r=GuillaumeGomezMatthias Krüger-4/+2
rustdoc: remove unused JS IIFE from main.js This [IIFE] made sense when it was added in f0683f98fa114cc4f9e795031f44be3eebb65790 and there was a local variable scoped to it, but now it only sets two globals, so it does nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2022-11-16Rollup merge of #104425 - notriddle:notriddle/main-heading-justify-content, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `.main-header { justify-content }` This rule was added in 152e8889052adaaa6c12652486292be34059713c to push the out-of-band content to the right while allowing it to line wrap when it got too big. The idea was that the justification rule would fill the space between the `<h1>` element and the `<div class="out-of-band">` element. A later commit, 3cb03cb34247383ffb67a017ae70134741e8c4da, flattened the in-band element into the `<h1>`, copying the `flex-grow` rule. This means the `<h1>` element now grows to fill the space, so there's no need to justify-content any more. This commit also adds a test case for this.
2022-11-16Rollup merge of #104424 - notriddle:notriddle/popover-font-size, ↵Matthias Krüger-2/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `.popover { font-size: 1rem }` This rule was added in cc4f804829ae because the help popover inherited the font-size from the help button "?" icon. It doesn't inherit this any more, because it was moved from being nested inside the link to sharing a wrapper DIV with it.
2022-11-15rustdoc: remove no-op CSS `#crate-search-div { display: inline-block }`Michael Howell-1/+0
`#crate-search-div` is nested directly below `.search-results-title`, which has `display: inline-flex`. This makes the crate-search-div a [flex item], which makes its display property irrelevant, because flex items have their display [blockified] in any case. [flex item]: https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item [blockified]: https://www.w3.org/TR/css-flexbox-1/#flex-items
2022-11-15rustdoc: remove pointless CSS `.rightside { padding-right: 2px }`Michael Howell-1/+0
This CSS was added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, as `.since { padding-right: 2px }`, to prevent it from uncomfortably touching the srclink, which was a separate floated element. It was carried forward with 962c0a4ee59e3c1a2413e785694c9433ffd0a9e1 to the new `.rightside`, but its role was replaced with adding " &bull; " between them. All it does now is pushes the element 2px away from the page's right margin. Removing this rule changes the page layout, but you have to look for it to notice it.
2022-11-15rustdoc: remove unused JS IIFE from main.jsMichael Howell-4/+2
This [IIFE] made sense when it was added in f0683f98fa114cc4f9e795031f44be3eebb65790 and there was a local variable scoped to it, but now it only sets two globals, so it does nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2022-11-15Rollup merge of #104415 - notriddle:notriddle/search-keyboard-commands, ↵Matthias Krüger-0/+1
r=GuillaumeGomez rustdoc: fix corner case in search keyboard commands This fixes a bug when that shows up in nightly and in stable where: * Search something * Press down: first result is highlighted * Press down: second result is highlighted * Press down: third result is highlighted * Press right: first result of second tab is highlighted * Press left: third result of first tab is highlighted * Press up: second result is highlighted * Press up: first result is highlighted * Press up: Search box is highlighted * Press down: **third result** is highlighted, where it ought to highlight the first result
2022-11-14rustdoc: remove no-op CSS `.main-header { justify-content }`Michael Howell-1/+0
This rule was added in 152e8889052adaaa6c12652486292be34059713c to push the out-of-band content to the right while allowing it to line wrap when it got too big. The idea was that the justification rule would fill the space between the `<h1>` element and the `<div class="out-of-band">` element. A later commit, 3cb03cb34247383ffb67a017ae70134741e8c4da, flattened the in-band element into the `<h1>`, copying the `flex-grow` rule. This means the `<h1>` element now grows to fill the space, so there's no need to justify-content any more. This commit also adds a test case for this.
2022-11-14rustdoc: remove no-op CSS `.popover { font-size: 1rem }`Michael Howell-2/+0
This rule was added in cc4f804829ae because the help popover inherited the font-size from the help button "?" icon. It doesn't inherit this any more, because it was moved from being nested inside the link to sharing a wrapper DIV with it.
2022-11-14rustdoc: fix corner case in search keyboard commandsMichael Howell-0/+1
2022-11-13rustdoc: remove unused CSS `code { opacity: 1 }`Michael Howell-4/+0
According to https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/CSS.20cleanup this style was added for declarations that no longer use opacity.
2022-11-13Simplify settings UI by merging system theme with the theme choicesGuillaume Gomez-24/+36
2022-11-13Rollup merge of #104323 - notriddle:notriddle/scrape-help-background, ↵Yuki Okushi-1/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `.scrape-help { background: transparent }` It's a link. This is the default CSS for it.
2022-11-13Rollup merge of #104177 - notriddle:notriddle/js-notable-trait-v2, ↵Yuki Okushi-73/+70
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 ![image](https://user-images.githubusercontent.com/1593513/200710372-d2d992ce-0bdc-4437-9a2e-379a29df09cf.png) ![image](https://user-images.githubusercontent.com/1593513/200711266-e372b176-daa9-45f3-a022-738ef0a77d3c.png) ## After ![image](https://user-images.githubusercontent.com/1593513/200710601-09b3b717-116f-43c6-b14f-34a8b02b33c0.png) ![image](https://user-images.githubusercontent.com/1593513/200711288-3978cdc1-a6c2-47f6-9216-e22e3c1f5bdf.png)
2022-11-13Rollup merge of #103650 - notriddle:notriddle/line-anchors, r=GuillaumeGomezYuki Okushi-8/+15
rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a` Example: https://notriddle.com/notriddle-rustdoc-demos/line-anchors/test_dingus/fn.test.html This allows people to treat them like real links, such as right-click to copy URL, and makes the line numbers in a scraped example work at all, when before this commit was added, they had the clickable pointer cursor but did not actually do anything when clicked.
2022-11-12Rollup merge of #104319 - GuillaumeGomez:fix-non-clickable-source-link, ↵Guillaume Gomez-2/+0
r=notriddle Fix non clickable source link Fixes https://github.com/rust-lang/rust/issues/104313. It was also fixed in https://github.com/rust-lang/rust/pull/104177. If https://github.com/rust-lang/rust/pull/104177 is merged first, I'll simply remove the first commit to keep the test. r? ``@notriddle``
2022-11-12rustdoc: avoid excessive HTML generated in example sourcesMichael Howell-2/+3
2022-11-12rustdoc: remove no-op CSS `.scrape-help { background: transparent }`Michael Howell-1/+0
It's a link. This is the default CSS for it.
2022-11-12Fix impossibility to click on source linkGuillaume Gomez-2/+0
2022-11-12Use same color for links in no result searchGuillaume Gomez-7/+0
2022-11-12Migrate no result page link color to CSS variablesGuillaume Gomez-13/+7
2022-11-12Rollup merge of #104267 - notriddle:notriddle/checkbox, r=GuillaumeGomezDylan DPC-70/+20
rustdoc: use checkbox instead of switch for settings toggles Preview: http://notriddle.com/notriddle-rustdoc-demos/checkbox/test_dingus/index.html ## Before ![image](https://user-images.githubusercontent.com/1593513/201232887-dee27ef5-b091-49bb-be4a-103d2e7983f3.png) ## After ![image](https://user-images.githubusercontent.com/1593513/201232835-95b40b77-6535-4280-8719-44c992a07772.png) ## 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
2022-11-11rustdoc: make notable traits popover behavior consistent with Help and SettingsMichael Howell-1/+9
2022-11-11rustdoc: use consistent "popover" styling for notable traitsMichael Howell-75/+62