about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css/rustdoc.css
AgeCommit message (Collapse)AuthorLines
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-0/+8
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-0/+7
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-0/+8
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-0/+7
2022-12-27rustdoc: combine common sidebar background color CSS rulesMichael Howell-5/+2
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-0/+5
Migrate toggle-line-inner background to CSS variable r? `@notriddle`
2022-12-24Migrate toggle-line-inner background to CSS variableGuillaume Gomez-0/+5
2022-12-23rustdoc: make line number CSS for doc comment and scraped the sameMichael Howell-21/+9
Discussed in https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling
2022-12-24Rollup merge of #106093 - notriddle:notriddle/docblock-short-overflow, ↵Matthias Krüger-2/+0
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.
2022-12-23rustdoc: remove no-op CSS from `.docblock-short`Michael Howell-2/+0
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.
2022-12-22rustdoc: use a more evocative name for CSS/JS `#titles`Michael Howell-5/+4
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.
2022-12-22Rollup merge of #106035 - ↵Matthias Krüger-0/+1
GuillaumeGomez:migrate-css-var-search-tab-title-color, r=notriddle Migrate search tab title color to CSS variable r? ```@notriddle```
2022-12-22Migrate search tab title color to CSS variableGuillaume Gomez-0/+1
2022-12-21rustdoc: simplify CSS and DOM for more-scraped-examplesMichael Howell-11/+6
This gets rid of the more-scraped-examples-inner wrapper, instead nesting the children directly and using absolute positioning for the toggle line.
2022-12-20Rollup merge of #105972 - notriddle:notriddle/anchor, r=GuillaumeGomezMatthias Krüger-6/+2
rustdoc: simplify section anchor CSS Since f50bf8636e3b0296db82e631fe95c84324a46ccc changed anchors to be always positioned absolute, specifying it on hover as well is redundant.
2022-12-20rustdoc: simplify section anchor CSSMichael Howell-6/+2
Since f50bf8636e3b0296db82e631fe95c84324a46ccc changed anchors to be always positioned absolute, specifying it on hover as well is redundant.
2022-12-20rustdoc: prevent CSS layout of line numbers shrinking into nothingMichael Howell-0/+1
2022-12-20Rollup merge of #105914 - GuillaumeGomez:simplify-css-examples-code-blocks, ↵Matthias Krüger-10/+0
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`
2022-12-20Rollup merge of #105912 - notriddle:notriddle/pre-line-height, r=GuillaumeGomezMatthias Krüger-0/+1
rustdoc: force pre tags to have the default line height Fixes #105906
2022-12-19Simplify CSS for code examples code blocksGuillaume Gomez-10/+0
2022-12-19rustdoc: remove width-limiter from source pages, stop overriding CSSMichael Howell-4/+0
2022-12-19rustdoc: force pre tags to have the default line heightMichael Howell-0/+1
Fixes #105906
2022-12-17Rollup merge of #105789 - notriddle:notriddle/examples-margin, r=GuillaumeGomezMatthias Krüger-9/+4
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.
2022-12-16rustdoc: clean up margin CSS for scraped examplesMichael Howell-9/+4
* 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.
2022-12-16Rollup merge of #105764 - notriddle:notriddle/src-sidebar-toggle, ↵Matthias Krüger-10/+10
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.
2022-12-16Rollup merge of #105756 - notriddle:notriddle/example-wrap-tooltip, ↵Matthias Krüger-12/+6
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.
2022-12-15rustdoc: name the source page sidebar-toggle `#src-sidebar-toggle`Michael Howell-10/+10
The old name doesn't get across where it's really supposed to be used.
2022-12-15rustdoc: simplify CSS for codeblock tooltipsMichael Howell-12/+6
Instead of making its parts `display: none` and then changing it on hover, just make the pseudo-element itself on hover.
2022-12-15Migrate Jump to def links background to CSS variableGuillaume Gomez-0/+4
2022-12-15Rollup merge of #105724 - ↵Matthias Krüger-1/+0
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.