about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css
AgeCommit message (Collapse)AuthorLines
2023-01-22Use correct pseudo-element selectorGuillaume Gomez-4/+4
2023-01-21Migrate scraped-examples top and bottom "borders" to CSS variablesGuillaume Gomez-21/+12
2023-01-20Rollup merge of #107131 - ↵Michael Goulet-6/+1
notriddle:notriddle/rustdoc-radio-display-inline-flex, r=GuillaumeGomez rustdoc: use CSS inline layout for radio line instead of flexbox This uses less code to lay them out the same way. Already tested here: https://github.com/rust-lang/rust/blob/5ce39f42bd2c8bca9c570f0560ebe1fce4eddb14/tests/rustdoc-gui/settings.goml#L123
2023-01-20Rollup merge of #107095 - notriddle:notriddle/sidebar-current, r=GuillaumeGomezMichael Goulet-1/+1
rustdoc: remove redundant CSS selector `.sidebar .current` Since the current sidebar item is already a link, it doesn't do anything.
2023-01-20rustdoc: use CSS inline layout for radio line instead of flexboxMichael Howell-6/+1
This uses less code to lay them out the same way.
2023-01-19rustdoc: remove redundant CSS selector `.sidebar .current`Michael Howell-1/+1
Since the current sidebar item is already a link, it doesn't do anything.
2023-01-18rustdoc: remove redundant rule `#settings .setting-line`Michael Howell-5/+1
Since the current version of settings.js always nests things below a div with ID `settings`, this rule always overrode the one above.
2023-01-17rustdoc: instead of `.setting-name { width: 100% }`, use default div CSSMichael Howell-4/+0
2023-01-14Rollup merge of #106828 - notriddle:notriddle/notable-trait-docblock, ↵Matthias Krüger-2/+6
r=GuillaumeGomez rustdoc: remove `docblock` class from notable trait popover This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes the `docblock` class from the All Items page, and 9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class from the item decl. Fixes #92974
2023-01-14Rollup merge of #106819 - notriddle:notriddle/rm-h1-fqn, r=GuillaumeGomezYuki Okushi-1/+1
rustdoc: remove unnecessary DOM class `h1.fqn` It's misleading. The main heading sometimes isn't an fully qualified name at all. It's also redundant. It's always a child of `div.main-heading`, so just use that.
2023-01-13rustdoc: remove `docblock` class from notable trait popoverMichael Howell-2/+6
This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes the `docblock` class from the All Items page, and 9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class from the item decl. Fixes #92974
2023-01-13rustdoc: rename CSS rustdoc-toggle -> toggle and toggle -> settings-toggleMichael Howell-43/+43
This swaps things around so that the class that gets used more often has the shorter name.
2023-01-13rustdoc: remove unnecessary DOM class `h1.fqn`Michael Howell-1/+1
It's misleading. The main heading sometimes isn't an fully qualified name at all. It's also redundant. It's always a child of `div.main-heading`, so just use that.
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-1/+1
2023-01-11Rollup merge of #106690 - GuillaumeGomez:item-declaration-scrolling, r=notriddleYuki Okushi-0/+4
Fix scrolling for item declaration block Fixes https://github.com/rust-lang/rust/issues/105580. The `contain: layout` was the issue here and the bug was actually on both mobile and desktop. r? `@notriddle`
2023-01-10Fix scrolling for item declaration blockGuillaume Gomez-0/+4
2023-01-09rustdoc: merge common CSS for `a`Michael Howell-4/+1
2023-01-07Rollup merge of #106556 - notriddle:notriddle/margin-left-content-mobile, ↵Matthias Krüger-4/+0
r=GuillaumeGomez rustdoc: remove no-op mobile CSS `.content { margin-left: 0 }` This rule was added to override non-zero left margin on `.content`, which was removed in 135281ed1525db15edd8ebd092aa10aa40df2386 and the margin-left was put on the docblock.
2023-01-06rustdoc: remove no-op mobile CSS `.content { margin-left: 0 }`Michael Howell-4/+0
This rule was added to override non-zero left margin on `.content`, which was removed in 135281ed1525db15edd8ebd092aa10aa40df2386 and the margin-left was put on the docblock.
2023-01-06rustdoc: remove no-op CSS `.rustdoc.source .sidebar { width: 0 }`Michael Howell-5/+1
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.
2023-01-06Rollup merge of #106502 - notriddle:notriddle/user-select, r=GuillaumeGomezDylan DPC-2/+0
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
2023-01-05rustdoc: remove legacy user-select CSSMichael Howell-2/+0
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
2023-01-05Auto merge of #106487 - GuillaumeGomez:fix-kbd-var, r=notriddlebors-1/+1
Fix --kbd-color variable name in rustdoc.css Interestingly enough, it only impacted the dark theme. Before: ![Screenshot from 2023-01-05 11-03-17](https://user-images.githubusercontent.com/3050060/210754145-c3bb0f50-d35f-4543-bf73-010a4524a803.png) After: ![Screenshot from 2023-01-05 11-03-05](https://user-images.githubusercontent.com/3050060/210754190-85c2f146-a774-4463-9cd3-9495b7c91bd7.png) r? `@notriddle`
2023-01-05Fix --kbd-color variable name in rustdoc.cssGuillaume Gomez-1/+1
2023-01-04rustdoc: remove unnecessary wrapper around sidebar and mobile logosMichael Howell-2/+3
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.
2023-01-03Rollup merge of #106411 - notriddle:notriddle/font-feature-settings, ↵Michael Goulet-4/+0
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
2023-01-03rustdoc: remove legacy font-feature-settings CSSMichael Howell-4/+0
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
2023-01-02rustdoc: remove legacy box-sizing CSSMichael Howell-2/+0
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
2023-01-02Auto merge of #106301 - notriddle:notriddle/dir-entry, r=GuillaumeGomezbors-23/+2
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 ![image](https://user-images.githubusercontent.com/1593513/210104247-642e6df0-07d3-452a-a2ab-4c700bc22e0e.png) ## After ![image](https://user-images.githubusercontent.com/1593513/210104271-a3832784-1e4d-4516-983e-6ecb9051857b.png)
2022-12-31Rollup merge of #106297 - notriddle:notriddle/scrape-help, r=GuillaumeGomezMatthias Krüger-10/+6
rustdoc: merge scrape-help CSS
2022-12-30rustdoc: use the regular arrow indicator for dir-entry CSSMichael Howell-23/+2
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.
2022-12-30rustdoc: merge scrape-help CSSMichael Howell-10/+6
2022-12-30Rollup merge of #106273 - notriddle:notriddle/source-content-overflow, ↵Matthias Krüger-4/+0
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.
2022-12-30Auto merge of #106262 - GuillaumeGomez:migrate-more-scraped-examples-css, ↵bors-24/+20
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`
2022-12-29rustdoc: remove redundant CSS `.source .content { overflow: visible }`Michael Howell-4/+0
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.
2022-12-29Auto merge of #106266 - matthiaskrgr:rollup-cxrdbzy, r=matthiaskrgrbors-5/+3
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
2022-12-29Rollup merge of #106218 - GuillaumeGomez:migrate-css-var-scraped-examples, ↵Matthias Krüger-18/+13
r=notriddle Migrate css var scraped examples r? ``@notriddle``
2022-12-29Rollup merge of #106217 - notriddle:notriddle/tooltip-center, r=GuillaumeGomezMatthias Krüger-1/+0
rustdoc: remove unnecessary `.tooltip::after { text-align: center }` This doesn't have an effect, since these tooltip are only one line anyway.
2022-12-29Migrate more scraped examples CSS rules to CSS variablesGuillaume Gomez-24/+20
2022-12-28rustdoc: simplify settings, help, and copy button CSS by not reusingMichael Howell-5/+3
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.
2022-12-28rustdoc: remove unnecessary `.tooltip::after { text-align: center }`Michael Howell-1/+0
This doesn't have an effect, since these tooltip are only one line anyway.
2022-12-28Migrate scraped examples higlight CSS to variablesGuillaume Gomez-18/+13
2022-12-27rustdoc: combine common sidebar background color CSS rulesMichael Howell-5/+2
2022-12-27Remove unused empty CSS rules in ayu themeGuillaume Gomez-4/+0
2022-12-26Auto merge of #106156 - fee1-dead-contrib:rollup-3ir0951, r=fee1-deadbors-8/+8
Rollup of 2 pull requests Successful merges: - #106151 (Remove unused imports) - #106153 (Fix missing renaming for #titles into #search-tabs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-26Fix missing renaming for #titles into #search-tabsGuillaume Gomez-8/+8
2022-12-25rustdoc: clean up src sidebar toggle position CSSMichael Howell-10/+4
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.
2022-12-24Auto merge of #106110 - GuillaumeGomez:toggle-line-background, r=notriddlebors-18/+11
Migrate toggle-line-inner background to CSS variable r? `@notriddle`
2022-12-24Migrate toggle-line-inner background to CSS variableGuillaume Gomez-18/+11
2022-12-23rustdoc: make line number CSS for doc comment and scraped the sameMichael Howell-25/+10
Discussed in https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling