about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css/rustdoc.css
AgeCommit message (Collapse)AuthorLines
2022-10-27Rollup merge of #103537 - notriddle:notriddle/line-numbers, r=GuillaumeGomezYuki Okushi-32/+19
rustdoc: combine shared CSS between `.*-line-numbers` Example: https://notriddle.com/notriddle-rustdoc-demos/line-numbers/test_dingus/fn.test.html This PR should result in no visible changes. The example is here, so it can be easily tested in different browsers.
2022-10-26rustdoc: remove redundant CSS selector `.notable-traits .notable`Michael Howell-1/+1
The margin was already being set to 0 only a few lines lower.
2022-10-26Update src/librustdoc/html/static/css/rustdoc.cssMichael Howell-1/+2
Co-authored-by: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
2022-10-25rustdoc: add visible focus outline to rustdoc-toggleMichael Howell-0/+8
The change in opacity is inconsistent with most of rustdoc, which uses default browser styles for the focus outline. Unfortunately, just using the default focus outline here won't work, because it gets applied to the summary itself instead of the pseudo-element "real button."
2022-10-25rustdoc: combine shared CSS between `.*-line-numbers`Michael Howell-32/+19
2022-10-25Rollup merge of #103494 - notriddle:notriddle/test-arrow-hover, r=GuillaumeGomezYuki Okushi-3/+0
rustdoc: remove redundant CSS `a.test-arrow:hover` In 4b402dbe690dd00f567542ca9e41042826a168b5, when this rule was added, it was overriding a rule that made all links in docblock get an underline when hovered. This became redundant when, after reordering the rules, 7585632052298f9c84cc12ac5afcb23786ae1d3d changed the pro-underline rule to exclude the test-arrow link anyway.
2022-10-25Rollup merge of #103493 - notriddle:notriddle/source-sidebar-logo, ↵Yuki Okushi-4/+0
r=GuillaumeGomez rustdoc: remove unused `.sidebar-logo` DOM on source pages
2022-10-24rustdoc: remove redundant CSS `a.test-arrow:hover`Michael Howell-3/+0
In 4b402dbe690dd00f567542ca9e41042826a168b5, when this rule was added, it was overriding a rule that made all links in docblock get an underline when hovered. This became redundant when, after reordering the rules, 7585632052298f9c84cc12ac5afcb23786ae1d3d changed the pro-underline rule to exclude the test-arrow link anyway.
2022-10-24rustdoc: fix weird toggle-all-docs style in iOSMichael Howell-0/+3
2022-10-24rustdoc: clean up `#toggle-all-docs`Michael Howell-4/+8
This change converts the element from an `<a>` link to a button. It's pretty much directly trading slightly more CSS for slightly less HTML, and it's also semantically correct (so you don't get a broken "bookmark" option when you right click on it). While doing this, I also got rid of the unnecessary `class="inner"` attribute on the inner span. There was a style targeting `.collapse-toggle > .inner`, but no CSS ever targeted the `#toggle-all-docs > .inner`.
2022-10-24rustdoc: remove unused `.sidebar-logo` DOM on source pagesMichael Howell-4/+0
2022-10-23rustdoc: remove no-op CSS `.source pre.rust { white-space: pre }`Michael Howell-1/+0
This rule, added in 49e6db7f3510a99ab3d3723b2430add985629c39, overrode a rule in normalize.css. https://github.com/rust-lang/rust/blob/49e6db7f3510a99ab3d3723b2430add985629c39/src/librustdoc/html/static/normalize.css#L169-L175 When normalize.css was updated, this rule went away. https://github.com/necolas/normalize.css/commit/a8edd0c5aa06b905e8e1550fd6a5c01e46375194
2022-10-23Rollup merge of #103424 - ↵Michael Howell-1/+0
notriddle:notriddle/code-header-border-bottom-none, r=GuillaumeGomez rustdoc: remove no-op CSS `.code-header { border-bottom: none }` The code headers are always h3 or h4, which don't have border-bottom by default anyway.
2022-10-22rustdoc: remove no-op CSS `.code-header { border-bottom: none }`Michael Howell-1/+0
The code headers are always h3 or h4, which don't have border-bottom by default anyway.
2022-10-21rustdoc: remove unused CSS class `.result-description`Michael Howell-3/+3
It was added to the CSS in d8de2b4c338471aacaf0e8a096f9a7148b146ab4, but was never actually used in that PR.
2022-10-22Rollup merge of #103370 - notriddle:notriddle/out-of-band, r=GuillaumeGomezMatthias Krüger-1/+0
rustdoc: remove unused CSS `.out-of-band { font-weight: normal }` This CSS was added in 083c3952e0d5473cd5c41a9eb7b4ffca18cc8e5f to normalize the appearance of out-of-band elements that were nested directly below headers. Now, the only use of `out-of-band` is in the main page header, and it is nested below a wrapper, not the `<h1>` itself.
2022-10-21rustdoc: remove unused CSS `.out-of-band { font-weight: normal }`Michael Howell-1/+0
This CSS was added in 083c3952e0d5473cd5c41a9eb7b4ffca18cc8e5f to normalize the appearance of out-of-band elements that were nested directly below headers. Now, the only use of `out-of-band` is in the main page header, and it is nested below a wrapper, not the `<h1>` itself.
2022-10-21rustdoc: prevent method summary margin from being applied to docblocksMichael Howell-2/+2
2022-10-21rustdoc: merge identical CSS blocksMichael Howell-8/+2
2022-10-20rustdoc: improve appearance of source page navigation barMichael Howell-19/+19
This commit changes things so that the search bar is exactly centered between the top of the page and the top of the source code content area.
2022-10-20Rollup merge of #103268 - notriddle:notriddle/nav-sub-font-size, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `nav.sub { font-size: 1rem }` This rule originated as a `font-size: 16px`, when body had `font-size: 13px` set in 4fd061c426902b0904c65e64a3780b21f9ab3afb. It remained even when body's font size was bumped up to 16px, 4d5f4ff5e9297dcad21612f9dd20ae4598b5b7e2, making the rule a no-op, and was carried forward when it was converted to 1rem in cc18120425a5c571a968d850c75cc935a8321136.
2022-10-20Rollup merge of #103251 - GuillaumeGomez:item-decl-highlighting, r=notriddleMatthias Krüger-20/+20
Fix item declaration highlighting Fixes https://github.com/rust-lang/rust/issues/103050. As mentioned in the issue, https://github.com/rust-lang/rust/pull/102924 introduced this regression. This PR partially reverts it and adds a regression test. r? `@notriddle`
2022-10-19rustdoc: remove no-op CSS `nav.sub { font-size: 1rem }`Michael Howell-1/+0
This rule originated as a `font-size: 16px`, when body had `font-size: 13px` set in 4fd061c426902b0904c65e64a3780b21f9ab3afb. It remained even when body's font size was bumped up to 16px, 4d5f4ff5e9297dcad21612f9dd20ae4598b5b7e2, making the rule a no-op, and was carried forward when it was converted to 1rem in cc18120425a5c571a968d850c75cc935a8321136.
2022-10-19Rollup merge of #103257 - notriddle:notriddle/setting-line, r=GuillaumeGomezMatthias Krüger-19/+0
rustdoc: move `setting-line` color CSS to settings.css
2022-10-19Rollup merge of #103211 - notriddle:notriddle/dot-location, r=GuillaumeGomezMatthias Krüger-25/+18
rustdoc: remove class name `location` from sidebar sibling nav Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-location/std/vec/struct.Vec.html This change tweaks the CSS to apply most of its styles to `.sidebar h2`, cleaning up a few redundant rules from `.mobile-topbar .location` and restoring useful navigation aids in mobile mode. ## Before ![location-before](https://user-images.githubusercontent.com/1593513/196521014-d8730830-c3a2-4ed7-9266-05454cd31e05.png) ## After ![location-after](https://user-images.githubusercontent.com/1593513/196521020-75ec1fa5-b3dc-4c5d-97b6-afccb5fbe00a.png)
2022-10-19rustdoc: move `setting-line` color CSS to settings.cssMichael Howell-19/+0
2022-10-19Fix regression in item-decl highlightingGuillaume Gomez-20/+20
2022-10-18rustdoc: remove class name `location` from sidebar sibling navMichael Howell-25/+18
This change tweaks the CSS to apply most of its styles to `.sidebar h2`, cleaning up a few redundant rules from `.mobile-topbar .location` and restoring useful navigation aids in mobile mode.
2022-10-17rustdoc: remove CSS `@media (min-width: 701px)`Michael Howell-20/+10
The two rules within it can and should be done without the separate media query: * There ain't no rule saying a viewport can't be `700.5px` wide, since hardware pixels can be finer than CSS pixels. * The rule for the first example-wrap child should probably apply on mobile. * The rule for the source sidebar is overriden by the mobile rule setting `max-width: 100vw`, so it can be merged with the rest of the styles.
2022-10-17Rollup merge of #103162 - notriddle:notriddle/crate-search, r=GuillaumeGomezMatthias Krüger-4/+0
rustdoc: remove redundant CSS `#crate-search { border-radius }` This is the same border-radius that's always set on that ID: https://github.com/rust-lang/rust/blob/a9d1cafa878ecc04a4aa7aaa7df0414a29a2bd0b/src/librustdoc/html/static/css/rustdoc.css#L825-L836
2022-10-17rustdoc: remove redundant CSS `#crate-search { border-radius }`Michael Howell-4/+0
This is the same border-radius that's always set on that ID: https://github.com/rust-lang/rust/blob/a9d1cafa878ecc04a4aa7aaa7df0414a29a2bd0b/src/librustdoc/html/static/css/rustdoc.css#L825-L836
2022-10-17rustdoc: remove redundant CSS on `#copy-path`Michael Howell-12/+8
The border and background were removed in 5d004c1e2020eaa9bc336f09b6b0475c0eef4d78, but not all the CSS was.
2022-10-16rustdoc: clean up `.sub-logo-container` CSSMichael Howell-13/+3
* Since it's used exclusively on source pages, no need to explicitly select. * No need to hide it when the sidebar is open, since it fills the whole page.
2022-10-15rustdoc: make the help button a link to a pageMichael Howell-10/+11
This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page.
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 #102914 - ↵Dylan DPC-5/+47
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-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-27/+27
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-11Rollup merge of #102898 - notriddle:notriddle/sidebar-block, r=GuillaumeGomezYuki Okushi-2/+3
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-5/+47
2022-10-10rustdoc: remove unneeded `<div>` wrapper from sidebar DOMMichael Howell-2/+3
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 #102815 - notriddle:notriddle/mobile-topbar, r=GuillaumeGomezMatthias Krüger-4/+0
rustdoc: remove mobile topbar from source pages instead of hiding it