about summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
2020-07-28ayu theme: Change doccomment color to `#a1ac88`Lzu Tao-3/+2
Co-authored-by: Cldfire <cldfire@3grid.net>
2020-07-26Don't italicize comments in ayu themeJarek Samic-1/+0
2020-07-24Rollup merge of #74504 - lzutao:ayu-border-selected-fn, r=GuillaumeGomezYuki Okushi-1/+3
Add right border bar to Dark and Light theme Demo: Light theme: https://github.com/rust-lang/rust/pull/74504#issuecomment-662491120 Dark theme: https://github.com/rust-lang/rust/pull/74504#issuecomment-662522446 Ayu theme: https://github.com/rust-lang/rust/pull/74504#issuecomment-662625685
2020-07-24Rollup merge of #74361 - GuillaumeGomez:theme-logo, r=ManishearthYuki Okushi-0/+12
Improve doc theme logo display Fixes #74350. The first commit cleans up the whitespaces and converts them to tabs. We should definitely write a tidy check for this (will do it in another PR). Screenshots: ![Screenshot from 2020-07-15 14-08-25](https://user-images.githubusercontent.com/3050060/87543748-8581c800-c6a5-11ea-8417-cbf98ebbfd10.png) ![Screenshot from 2020-07-15 14-11-59](https://user-images.githubusercontent.com/3050060/87543747-84e93180-c6a5-11ea-8cea-976b1470e809.png) ![Screenshot from 2020-07-15 14-12-12](https://user-images.githubusercontent.com/3050060/87543745-84509b00-c6a5-11ea-8324-c3c46ab2d9ef.png) r? @lzutao cc @Cldfire
2020-07-24Add right border bar to Dark and Light themeLzu Tao-0/+2
Ayu has it. Adding similar rule to other themes makes users less surprised and makes GUI more consistent.
2020-07-24ayu: Change to less luminous colorLzu Tao-1/+1
Co-authored-by: Cldfire <cldfire@3grid.net>
2020-07-22Rollup merge of #74635 - GuillaumeGomez:fix-tooltip-pos, r=ManishearthManish Goregaokar-0/+10
Fix tooltip position if the documentation starts with a code block Fixes #74321. Before: ![before](https://user-images.githubusercontent.com/3050060/88188970-cf842400-cc38-11ea-839b-37e41656837d.png) After: ![after](https://user-images.githubusercontent.com/3050060/88188981-d3b04180-cc38-11ea-8194-713ffe640d3a.png) And in case there is text, it is not being applied: ![after-witness](https://user-images.githubusercontent.com/3050060/88189009-ddd24000-cc38-11ea-9f0a-61dfd0a0cbd0.png) And on mobile it isn't needed so it's not "activated": ![Screenshot from 2020-07-22 17-17-43](https://user-images.githubusercontent.com/3050060/88194698-65bb4880-cc3f-11ea-8513-0043ccca8cfc.png) r? @rust-lang/rustdoc
2020-07-22Fix tooltip position if the documentation starts with a code blockGuillaume Gomez-0/+10
2020-07-20Rollup merge of #74555 - GuillaumeGomez:important-traits-popup, r=ManishearthManish Goregaokar-0/+5
Improve "important traits" popup display on mobile I implemented what @XAMPPRocky suggested in the [internals thread topic](https://internals.rust-lang.org/t/feedback-on-important-traits-rustdoc-feature/12752/18). I can confirm it works nicely. r? @Manishearth @Manishearth: By the way: I realized that when you click on the "i", you have to click again to make the popup disappear. Do you want me to extend the popup removal to any click outside the popup?
2020-07-20Rollup merge of #74505 - Cldfire:fix-search-focus, r=GuillaumeGomezManish Goregaokar-10/+0
Fix search input focus in ayu theme Closes #74496. Before: ![image](https://user-images.githubusercontent.com/13814214/87868463-d0c8fe80-c963-11ea-9003-aa578d869e98.png) After: ![image](https://user-images.githubusercontent.com/13814214/87868467-dc1c2a00-c963-11ea-89a8-1280f68ff9df.png)
2020-07-20Improve "important traits" popup display on mobileGuillaume Gomez-0/+5
2020-07-19Ayu: use different background color to make Run button easy-to-spotLzu Tao-4/+3
Co-authored-by: Cldfire <cldfire@3grid.net>
2020-07-19Fix search input focus in ayu themeJarek Samic-10/+0
2020-07-19Add an border around the Run buttonLzu Tao-0/+1
2020-07-17Fix tidy issuesGuillaume Gomez-23/+35
2020-07-17Convert whitespaces to tabsGuillaume Gomez-44/+54
2020-07-17Improve logo image display in different themesGuillaume Gomez-0/+12
2020-07-16Rollup merge of #74371 - Aloso:patch-1, r=GuilliameGomezManish Goregaokar-9/+6
Improve ayu rustdoc theme This PR changes the following: * It makes some lines darker * It gives the crate selector and search bar a border * The search bar's border turns blue when focused * ~~Gives the logo a bright shadow.~~ For standard library crates, it would be better to invert the logo, but that would be bad for crates with a colored logo, e.g. [async-std](https://docs.rs/async-std/1.6.2/async_std/). Before: ![old](https://user-images.githubusercontent.com/15658558/87576611-ed4e0800-c6d1-11ea-9667-3924702f79e2.png) After (note that this PR no longer includes the white shadow of the logo): ![new](https://user-images.githubusercontent.com/15658558/87576621-ef17cb80-c6d1-11ea-8e15-5d7f8b180c07.png)
2020-07-16Rollup merge of #74351 - lzutao:remove-rustc-internal-compiler-warns, ↵Manish Goregaokar-16/+0
r=Mark-Simulacrum Do not render unstable items for rustc doc See the zulip conversion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rustc.20doc.3A.20.22internal.20compiler.20API.22.20warns.20are.20everywhere!/near/203850782 Before: ![image](https://user-images.githubusercontent.com/15225902/87501971-9cff8780-c68a-11ea-93b4-ea53ce18a77b.png) After: ![image](https://user-images.githubusercontent.com/15225902/87501985-a7218600-c68a-11ea-81c0-a6b5b120832c.png) Nothing changes in unstable items of std: Before: ![image](https://user-images.githubusercontent.com/15225902/87502004-b7d1fc00-c68a-11ea-9224-a27a1d2a81d6.png) After: ![image](https://user-images.githubusercontent.com/15225902/87502018-c0c2cd80-c68a-11ea-9773-4c63158025cb.png) Closes #54682
2020-07-16Rollup merge of #74370 - Manishearth:re-spotlight, r=GuillaumeGomezManish Goregaokar-9/+87
Reintroduce spotlight / "important traits" feature (Reopened version of https://github.com/rust-lang/rust/pull/74111 because Github is broken, see discussion there) Fixes https://github.com/rust-lang/rust/issues/73785 This PR reintroduces the "spotlight" ("important traits") feature. A couple changes have been made: As there were concerns about its visibility, it has been moved to be next to the return type, as opposed to being on the side. It also no longer produces a modal, it shows the traits on hover, and it can be clicked on to pin the hover bubble. ![image](https://user-images.githubusercontent.com/1617736/86674555-a82d2600-bfad-11ea-9a4a-a1a9ffd66ae5.png) ![image](https://user-images.githubusercontent.com/1617736/86674533-a1061800-bfad-11ea-9e8a-c62ad86ed0d7.png) It also works fine on mobile: ![image](https://user-images.githubusercontent.com/1617736/86674638-bda25000-bfad-11ea-8d8d-1798b608923e.png)
2020-07-16Rollup merge of #74325 - GuillaumeGomez:focus-source-file-sidebar, r=kinnisonManish Goregaokar-0/+5
Focus on the current file in the source file sidebar Fixes #73360. r? @kinnison cc @rust-lang/rustdoc
2020-07-16Don't position:relative on all presManish Goregaokar-1/+6
We need it for run buttons (https://github.com/rust-lang/rust/pull/44671), but not function defs
2020-07-16Remove !important on border-color and background-colorManish Goregaokar-10/+7
2020-07-16Add Ayu theme for spotlightManish Goregaokar-0/+5
2020-07-16Review comments for JSManish Goregaokar-8/+2
2020-07-16Make spotlight show on hoverManish Goregaokar-144/+49
This makes the spotlight show on hover instead of click. Clicks can be used to persist it, which is also what's used on mobile.
2020-07-16Move spotlight next to the return typeManish Goregaokar-14/+2
2020-07-16Revert "Remove "important traits" feature"Manish Goregaokar-3/+187
This reverts commit 1244ced9580b942926afc06815e0691cf3f4a846.
2020-07-16Remove elements iterator clone and only keep first element insteadGuillaume Gomez-3/+3
2020-07-15Remove drop-shadowLudwig Stecher-5/+0
2020-07-15Rollup merge of #74218 - GuillaumeGomez:search-results-bottom-margin, ↵Manish Goregaokar-0/+1
r=Dylan-DPC Add margin after doc search results I found it not really on computer that the last result is right at the bottom of the page. I find it better with margin below (especially when you hover the last element!). A screenshot to show the result: ![Screenshot from 2020-07-10 16-32-23](https://user-images.githubusercontent.com/3050060/87166097-6103a580-c2cb-11ea-81a8-12772cf20f64.png) r? @kinnison cc @rust-lang/rustdoc @Manishearth @jyn514
2020-07-15Rollup merge of #74196 - GuillaumeGomez:auto-collapse-implementors, ↵Manish Goregaokar-3/+9
r=Manishearth Add option to collapse automatically implementors Fixes #73403 It adds an option (enabled by default) which collapses all implementors impl blocks. r? @kinnison cc @rust-lang/rustdoc
2020-07-15Improve ayu rustdoc themeLudwig Stecher-9/+11
* It makes some lines darker * It gives the crate selector and search bar a border * The search bar's border turns blue when focused * Gives the logo a bright shadow. This makes dark logos stand out more
2020-07-15Remove unused CSS rules for internal rustc itemsLzu Tao-16/+0
2020-07-14Focus on the current file in the source file sidebarGuillaume Gomez-0/+5
2020-07-12Add Ayu theme to rustdocJarek Samic-0/+561
2020-07-10Add margin after doc search resultsGuillaume Gomez-0/+1
2020-07-09Add option to collapse automatically implementorsGuillaume Gomez-3/+9
2020-07-06Rollup merge of #74067 - rye:rustdoc-fqn-hover-underline, r=GuillaumeGomezManish Goregaokar-0/+3
rustdoc: Restore underline text decoration on hover for FQN in header This causes the components of FQN's (e.g. `std`, `net`, and `Ipv4Addr` of the FQN `std::net::Ipv4Addr`) to behave similarly to other links in the contents of rustdoc-styled pages. When the user hovers over them, more clearly indicating that they can be used for navigation. I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to. <details><summary>📸 Before, mouse hovered over "net" in the FQN</summary> <img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, producing no visual change" src="https://user-images.githubusercontent.com/1566689/86538363-4c827000-bebb-11ea-8291-5ea6b85d7e19.png" /> </details> <details><summary>📸 After, mouse hovered over "net" in the FQN</summary> <img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, now with an underline showing up under the word hovered over by the mouse" src="https://user-images.githubusercontent.com/1566689/86538471-d3374d00-bebb-11ea-9bb3-7aa2d7a4800b.png" /> </details>
2020-07-05rustdoc: Restore underline text decoration on hover for FQN in headerKristofer Rye-0/+3
This causes the components of FQN's to behave similarly to other links in the contents of rustdoc-styled pages. I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to. In short, this patch makes links in the FQN have an underline when the user hovers over them, more clearly indicating that they can be used for navigation. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
2020-07-02Simplify DOM by removing IDs for code tagsGuillaume Gomez-14/+7
2020-07-02Expand sub code blocks block content when hidden when the page hash refers to itGuillaume Gomez-0/+8
2020-07-02Improve page hash handlingGuillaume Gomez-5/+7
2020-07-02No need to call getPageId a second timeGuillaume Gomez-1/+1
2020-06-26Rollup merge of #72967 - integer32llc:prevent-default-arrows, r=kinnisonManish Goregaokar-0/+2
Don't move cursor in search box when using arrows to navigate results ## What happens - Go to https://doc.rust-lang.org/stable/std/index.html - Press 's' to focus the search box - Type a query like 'test' - Press the down arrow one or more times to change which search result is highlighted - Press the up arrow once to go up one search result - Notice the cursor in the search box is now at the beginning of your query, such that if you now typed 'a' the search box would contain 'atest', when it would be expected that the cursor would have remained where it was and if you typed 'a' at this point it would result in 'testa' - Press the down arrow once to go down one search result - Now notice the cursor is at the end of your query again ## What I expected I expected that changing which search result was highlighted using the up and down arrows would have no effect on where the cursor was in the search box. ## The fix This PR prevents the default action of the up and down arrows when the custom keydown events are happening during a search.
2020-06-23rustdoc: Fix doc aliases with crate filteringOliver Middleton-6/+7
Fix a crash when searching for an alias contained in the currently selected filter crate. Also remove alias search results for crates that should be filtered out. The test suite needed to be fixed to actually take into account the crate filtering and check that there are no results when none are expected.
2020-06-18Rollup merge of #73476 - JakobDegen:should_panic_rustdoc, r=GuillaumeGomezManish Goregaokar-1/+33
Added tooltip for should_panic code examples This change adds a tooltip to the documentation for `should_panic` examples. It currently displays identically to `compile_fail` examples, save for the changed text. It may be helpful to change the color that this displays in to make it visually more clear what is going on, but I'm unsure if additional colors wouldn't just be distracting. I brought this [up on internals](https://internals.rust-lang.org/t/indicating-that-an-example-is-should-panic-in-docs/12544) a few days ago, and there seemed to be a mild positive response to it.
2020-06-18Rollup merge of #72968 - integer32llc:docs-arrow-keys, r=GuillaumeGomezManish Goregaokar-13/+24
Only highlight doc search results via mouseover if mouse has moved ## What happens - Go to https://doc.rust-lang.org/stable/std/index.html - Put your mouse cursor somewhere in the middle where search results will appear and then don't move the mouse - Press 's' to focus the search box - Type a query that brings up enough search results to go under where your mouse cursor is - Press the down arrow - The search result that is one below where your mouse cursor is will be highlighted. ## What I expected When not currently using the mouse, I expect doing a search and then pressing the down arrow to always highlight the first search result immediately below the search box. ## The fix This feels a bit hacky to me; I'm open to other solutions. This introduces a global JS var that keeps track of whether the person searching has moved their mouse after doing a search or not, and only uses the mouse position to highlight search results if the person HAS moved the mouse AFTER doing a search.
2020-06-18Added tooltip for should_panic code examples.Jake Degen-1/+33
Previously, compile_fail and ignore code examples displayed a tooltip indicating this in the documentation. This tooltip has now also been added to should_panic examples.
2020-06-08Rollup merge of #71842 - tspiteri:doc-impl-const, r=GuillaumeGomezDylan DPC-1/+3
doc: make impl block collapsible if it has an associated constant Fixes #71822.