summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
2021-07-27Rustdoc accessibility: use real headers for doc itemsbors-9/+17
Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-23Rollup merge of #87376 - Thomasdezeeuw:rustdoc-large-logo, r=GuillaumeGomezYuki Okushi-0/+1
Change rustdoc logo to use the full container size We have a logo in svg that scales nicely to large sizes, but by default is only 5px large, i.e. very small. With the change the logo expands to the full size. By only setting the height to 100% we ensure that the width-height ratio isn't changed.
2021-07-22Don't hide fields of enum struct variantsNoah Lev-1/+1
* The toggle adds visual clutter * It's easy to miss that there are fields * Tuple variant fields are always shown, so it is inconsistent to hide struct variant fields * It's annoying to have to click the toggle every time
2021-07-22Change rustdoc logo to use the full container sizeThomas de Zeeuw-0/+1
We have a logo in svg that scales nicely to large sizes, but by default is only 5px large, i.e. very small. With the change the logo expands to the full size. By only setting the height to 100% we ensure that the width-height ratio isn't changed.
2021-07-21rustdoc: Restore --default-theme, etc, by restoring varname escapingIan Jackson-0/+2
In #86157 cd0f93193c84ddc6698f9b65909da71c084dcb74 Use Tera templates for rustdoc. dropped the following transformation from the keys of the default settings element's `data-` attribute names: .map(|(k, v)| format!(r#" data-{}="{}""#, k.replace('-', "_"), Escape(v))) The `Escape` part is indeed no longer needed, because Tera does that for us. But the massaging of `-` to `_` is needed, for the (bizarre) reasons explained in the new comments. I have tested that the default theme function works again for me. I have also verified that passing --default-theme="zork&" escapes the value in the HTML. Closes #87263. CC: Jacob Hoffman-Andrews <github@hoffman-andrews.com> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2021-07-21Rollup merge of #87230 - GuillaumeGomez:docblock-table-overflow, r=notriddleGuillaume Gomez-4/+5
Fix docblock <table> overflow Before: ![Screenshot from 2021-07-18 00-05-23](https://user-images.githubusercontent.com/3050060/126050272-ce08bc5f-74ff-4135-bc12-d708d87470cc.png) After: ![Screenshot from 2021-07-18 00-03-55](https://user-images.githubusercontent.com/3050060/126050273-42f41b4d-ad57-4a87-91de-18e63f8504ec.png) cc `@SergioBenitez` r? `@notriddle`
2021-07-19Rollup merge of #87251 - GuillaumeGomez:item-info-width, r=notriddleGuillaume Gomez-0/+3
Fix "item info" width Fixes #87202. It now looks again like this: ![Screenshot from 2021-07-18 12-33-27](https://user-images.githubusercontent.com/3050060/126064005-013acabc-7f17-4436-8dfc-cb6b9bc24413.png) cc `@jyn514` r? `@notriddle`
2021-07-18Fix item info displayGuillaume Gomez-0/+3
2021-07-18Fix <table> overflow in doc blocksGuillaume Gomez-4/+5
2021-07-17Remove redundant CSSMichael Howell-1/+0
2021-07-17Rustdoc accessibility: make the sidebar headers actual headersMichael Howell-0/+5
Part of #87059 Preview it at: https://notriddle.com/notriddle-rustdoc-test/rustdoc-sidebar-header/std/index.html
2021-07-16Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, ↵Guillaume Gomez-1/+2
r=GuillaumeGomez feat(rustdoc): open sidebar menu when links inside it are focused Fixes #87172 Based on #87167 (which should be merged first) r? ``@GuillaumeGomez`` Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
2021-07-16feat(rustdoc): open sidebar menu when links inside it are focusedMichael Howell-1/+2
Fixes #87172 Based on #87167 (which should be merged first) Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html Co-authored-by: Guillaume Gomez <guillaume.gomez@huawei.com>
2021-07-16Rollup merge of #87167 - GuillaumeGomez:sidebar-display-mobile, r=notriddleGuillaume Gomez-4/+6
Fix sidebar display on small devices Part of #87059. Instead of hiding the sidebar on small devices, we instead move it out of the viewport so that it remains "visible" to our text only users. Could you confirm it works for you `@ahicks92` and `@DataTriny` please? You can give it a try at [this URL](https://guillaume-gomez.fr/rustdoc-test/test_docs/index.html). r? `@notriddle`
2021-07-15Do not hide the sidebar on mobile, move it outside of the viewport insteadGuillaume Gomez-4/+6
2021-07-15Fix layout overflow in type declarationGuillaume Gomez-0/+3
2021-07-14Rollup merge of #87125 - GuillaumeGomez:ayu-code-color, r=notriddleGuillaume Gomez-1/+1
Fix Ayu theme <code> color Fixes #87072 (the second regression). r? `@notriddle`
2021-07-14Rollup merge of #87056 - GuillaumeGomez:fix-codeblocks-overflow, r=notriddleGuillaume Gomez-1/+1
Fix codeblocks overflow Fixes #87043. Instead of completely relying on `pulldown-cmark` (and its potential changes), I decided to move the generation of codeblocks HTML directly in rustdoc so we can unify the DOM and the CSS classes. r? `@Nemo157`
2021-07-14Fix color for <code> which are not in doc blocksGuillaume Gomez-1/+1
2021-07-14Fix display for non-rust code blocksGuillaume Gomez-1/+1
2021-07-13Fix color for keyword/primitive search resultGuillaume Gomez-3/+3
2021-07-13Fix search result description text color for ayu themeGuillaume Gomez-1/+1
2021-07-13Rollup merge of #87035 - GuillaumeGomez:fix-implementors-display, r=notriddleYuki Okushi-4/+14
Fix implementors display Part of https://github.com/rust-lang/rust/issues/86632. This PR does a few things: * It fixes of the JS rendered implementors. * It generates anchors for JS rendered implementors to make it coherent with the others. * It adds a test to ensure that we won't have the same issue again. * It changes the way we render the rustdoc-gui crates to simplify it a bit and also to allow to have dependencies without going through compiletest. Before: ![Screenshot from 2021-07-10 13-30-13](https://user-images.githubusercontent.com/3050060/125174172-b4048700-e1c3-11eb-8f0e-c46081371d4f.png) After: ![Screenshot from 2021-07-10 21-11-15](https://user-images.githubusercontent.com/3050060/125174173-b49d1d80-e1c3-11eb-8740-1dbbff70c2eb.png) I plan to add the `[src]` links in another PR because this one is already big enough. cc `@Mark-Simulacrum` (for the bootstrap changes) r? `@Nemo157`
2021-07-10cleanup(rustdoc): remove unused function getObjectNameByIdMichael Howell-15/+8
This function was used in an earlier version, when idx's were used to serialize function inputs and outputs. That's not done any more, so removed the JS-side support for it.
2021-07-10Fix display for external trait implementorsGuillaume Gomez-4/+14
2021-07-08Fix display of small-section-header elementsGuillaume Gomez-5/+0
2021-07-07Clean up rustdoc static filesGuillaume Gomez-0/+0
2021-07-05Auto merge of #86663 - fee1-dead:use-rustdoc-css, r=GuillaumeGomezbors-3/+2
Use rustdoc.css for error index Closes #86512.
2021-07-01fix(rustdoc): generics searchMichael Howell-18/+62
This commit adds a test case for generics, re-adds generics data to the search index, and tweaks function indexing to use less space in JSON. This reverts commit 14ca89446c076bcf484d3d05bd991a4b7985a409.
2021-07-01Rollup merge of #86746 - GuillaumeGomez:query-type-filter, r=notriddleYuki Okushi-1/+2
Fix rustdoc query type filter I realized while reviewing #86659 that the type filter was broken on search so I'd prefer it to get merged before merging #86659. r? `@notriddle`
2021-06-30Enforce search typed queriesGuillaume Gomez-1/+2
2021-06-30Auto merge of #86650 - GuillaumeGomez:fix-boldness, r=Nemo157bors-3/+9
Fix boldness (put it back where needed) I realized that I created a GUI test that wasn't run because it had ".rs" extension instead of ".goml" so I moved its content into `font-weight.goml` (since it was checking font weight).
2021-06-30Fix some style regressions due to normalize.css 8Yuki Okushi-2/+23
2021-06-30Upgrade normalize.css to v8.0.1Yuki Okushi-1/+1
2021-06-28Move stab_tags to symbol in tablesStefan Schindler-1/+1
2021-06-28Auto merge of #85876 - jeanlucthumm:master, r=GuillaumeGomezbors-4/+4
Add `go_to_first` query param to jump to first result Fixes #84214 Note that while the issue initially wanted to navigate to an entry on exact match, the discussion settled on using a query parameter (`&go_to_first=true`) instead, regardless of exact or partial match. Demonstration is attached https://user-images.githubusercontent.com/4934853/120258768-7ff28980-c247-11eb-8c8f-1a2ceb242788.mp4
2021-06-27Auto merge of #86589 - JohnTitor:add-triangle-to-summary, r=jshabors-4/+6
Show triangle on the "Details" disclosure element in all cases Re-submission of #82805, fixes the style issue by applying the same margin as `<p>`. <details><summary>Before</summary> ![before 1](https://user-images.githubusercontent.com/25030997/123215032-e4c99880-d502-11eb-9ccc-6df58f3a6b0b.png) ![before 2](https://user-images.githubusercontent.com/25030997/123215035-e5622f00-d502-11eb-9275-6c6dfcfdf72e.png) </details> <details><summary>After</summary> ![after 1](https://user-images.githubusercontent.com/25030997/123215037-e5fac580-d502-11eb-9b49-c99d1eafb1b4.png) ![after 2](https://user-images.githubusercontent.com/25030997/123215040-e5fac580-d502-11eb-8afc-ab713d3dc658.png) </details> r? `@GuillaumeGomez`
2021-06-27Add go_to_first boolean query param to immeidately jump to the first search ↵Jean-Luc Thumm-4/+4
result
2021-06-27Use rustdoc.css for error indexDeadbeef-3/+2
2021-06-27Add FIXME commentYuki Okushi-0/+1
2021-06-26Fix font weight on types, methods and associated types/constsGuillaume Gomez-3/+9
2021-06-26Auto merge of #86586 - Smittyvb:https-everywhere, r=petrochenkovbors-1/+1
Use HTTPS links where possible While looking at #86583, I wondered how many other (insecure) HTTP links were in `rustc`. This changes most other `http` links to `https`. While most of the links are in comments or documentation, there are a few other HTTP links that are used by CI that are changed to HTTPS. Notes: - I didn't change any to or in licences - Some links don't support HTTPS :( - Some `http` links were dead, in those cases I upgraded them to their new places (all of which used HTTPS)
2021-06-25Show triangle on the "Details" disclosure element in all casesYuki Okushi-4/+5
Co-authored-by: Miguel Ojeda <ojeda@kernel.org>
2021-06-24Migrate from custom elements to divs with classes to be compatible with safariStefan Schindler-8/+8
2021-06-24Hide Crate Version on narrow ScreensStefan Schindler-2/+17
2021-06-24Implement Desktop and Mobile version with gridlayoutStefan Schindler-1/+32
* implement sans-serif #85621
2021-06-23Use HTTPS links where possibleSmitty-1/+1
2021-06-23Fix search filter updateGuillaume Gomez-0/+4
2021-06-22Rollup merge of #86402 - tspiteri:source-woff2, r=jshaYuki Okushi-11/+24
rustdoc: add optional woff2 versions of Source Serif and Source Code This provides woff2 versions of Source Serif and Source Code similar to how #82545 provides woff2 versions of Fira Sans. The total byte count for the six files (three for each font family) is reduced by 25% from 476 KiB to 358 KiB.
2021-06-22Rollup merge of #86274 - alexander-melentyev:spaces, r=bjorn3Yuki Okushi-2/+2
Spaces