about summary refs log tree commit diff
path: root/src/librustdoc/html/static/rustdoc.css
AgeCommit message (Collapse)AuthorLines
2021-07-07Clean up rustdoc static filesGuillaume Gomez-1888/+0
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-28Move stab_tags to symbol in tablesStefan Schindler-1/+1
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 FIXME commentYuki Okushi-0/+1
2021-06-26Fix font weight on types, methods and associated types/constsGuillaume Gomez-3/+9
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-22Rollup merge of #86402 - tspiteri:source-woff2, r=jshaYuki Okushi-6/+15
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-19Rollup merge of #86370 - ↵Yuki Okushi-0/+6
matteo-briani:fix-rustdoc-stabilized-versions-layout, r=GuillaumeGomez Fix rustdoc stabilized versions layout Fixes #86342 r? `@GuillaumeGomez`
2021-06-17rustdoc: add optional woff2 versions of Source Serif and Source CodeTrevor Spiteri-6/+15
2021-06-17Fix rustdoc stabilized versions layoutMatteo Briani-0/+6
2021-06-16Fix target highlighting in rustdoc.Jacob Hoffman-Andrews-0/+4
Also factor out outer_version and const_outer_version into render_rightside.
2021-06-16Factor out render_rightsideJacob Hoffman-Andrews-8/+0
This covers rendering of stability_since and the srclink across methods and trait implementations, so their DOM representation is consistent.
2021-06-16Make portability part of the summary.Jacob Hoffman-Andrews-9/+3
That means it will be visible under "Implementors" on trait pages, and under "Implementations" on struct/enum pages, even when all methods are collapsed. Switch to a float layout for rightside elements.
2021-06-13Fix font-weightGuillaume Gomez-3/+3
2021-06-08Rollup merge of #86078 - GuillaumeGomez:type-page-font-weight, r=jshaYuki Okushi-1/+1
Type page font weight Fixes https://github.com/rust-lang/rust/issues/86069. r? ```@jsha```
2021-06-06Fix invalid weight for type pagesGuillaume Gomez-1/+1
2021-06-05Fix display for search resultsGuillaume Gomez-0/+2
2021-06-03Auto merge of #84834 - GuillaumeGomez:sidebar-unification, r=jshabors-1/+4
Sidebar unification This PR does a few things: * Put crates list at all levels (before, it was only on the "top" items) * Fix bug in module sidebar: the list of items was from the parent module. The other changes (on bootstrap mostly) were to allow to generate multiple crates in a same folder so that we can ensure that clicking on the crates in the sidebar works as expected. I added a rustdoc-gui test to ensure everything is where it should be. r? `@jyn514`
2021-06-02Replace h3 for notable traits with divGuillaume Gomez-12/+8
2021-06-02Remove data-level selectors from CSS.Jacob Hoffman-Andrews-71/+13
2021-06-01Remove invalid usage of aria-levelGuillaume Gomez-18/+18
2021-06-01Replace h3 and h4 containing invalid DOMGuillaume Gomez-22/+68
2021-05-31Fix details rustdoc toggle for blanket implIvan Tham-2/+1
In the meantime, allow all of the details to have the same top.
2021-05-31Improve display of the separation between page items and siblings in the sidebarGuillaume Gomez-1/+4
2021-05-26Rollup merge of #84048 - konan8205:master, r=jshaYuki Okushi-1/+9
Avoid CJK legacy fonts in Windows As metioned in #84035, the default serif CJK font in Windows is meh-looking. To avoid this, we should use sans-serif font or provide CJK glyph supported font in `rustdoc.css`.
2021-05-25Move extra search result information for keywords and primitives from CSS to DOMGuillaume Gomez-10/+0
2021-05-24Rollup merge of #85621 - jsha:serif-in-table, r=GuillaumeGomezGuillaume Gomez-0/+1
Restore sans-serif font for module items. This was broke in #84462 by modifying a style that applied both to searches and to module items (and other tables). Fixes #85616. Fixes https://github.com/rust-lang/rust/issues/85545. r? `@camelid`
2021-05-24Rollup merge of #85551 - GuillaumeGomez:fix-search-result-overflow, r=jshaGuillaume Gomez-5/+32
Fix search results display Fixes https://github.com/rust-lang/rust/issues/85544. cc `@dns2utf8` r? `@jsha`
2021-05-23Restore sans-serif font for module items.Jacob Hoffman-Andrews-0/+1
This was broke in #84462 by modifying a style that applied both to searches and to module items (and other tables).
2021-05-22Set desc class on the div instead of the span to simplify CSSGuillaume Gomez-4/+4
2021-05-22Mobile description width: 100%Stefan Schindler-1/+1
2021-05-22Add padding to mobile layout and fix width issue on bothStefan Schindler-0/+2
2021-05-22Prepar to remove deep nestingStefan Schindler-6/+5
2021-05-22Implement staggered mobile layoutStefan Schindler-4/+17
2021-05-21Fix display for primitive and keyword extra infoGuillaume Gomez-2/+2
2021-05-21Fix search results displayGuillaume Gomez-3/+16
2021-05-18Rollup merge of #85396 - jsha:top-doc-font-sizes, r=GuillaumeGomezJack Huey-3/+7
rustdoc: restore header sizes The `<details>` toggle work changed the relationship from #main to the top-doc docblock so it was no longer a parent relationship but a great-grandparent relationship. This updates the CSS rules that set the heading sizes so they still apply. Fixes #85389 r? ``@camelid``
2021-05-18Rollup merge of #85407 - GuillaumeGomez:copy-path-display-improvement, r=jshaRalf Jung-3/+2
Improve display for "copy-path" button, making it more discreet As suggested by `@Nemo157` [here](https://github.com/rust-lang/rust/pull/85118#issuecomment-838887670): ![Screenshot from 2021-05-18 11-18-49](https://user-images.githubusercontent.com/3050060/118626882-899ddb00-b7cb-11eb-84c5-ef68dee5e351.png) ![Screenshot from 2021-05-18 11-15-06](https://user-images.githubusercontent.com/3050060/118626880-899ddb00-b7cb-11eb-95c1-2f3bacd22374.png) ![Screenshot from 2021-05-18 11-18-54](https://user-images.githubusercontent.com/3050060/118626885-8a367180-b7cb-11eb-870c-7acdf4259bef.png) ![Screenshot from 2021-05-18 11-15-00](https://user-images.githubusercontent.com/3050060/118626877-89054480-b7cb-11eb-9efc-9a0f153964ce.png) ![Screenshot from 2021-05-18 11-18-58](https://user-images.githubusercontent.com/3050060/118626888-8a367180-b7cb-11eb-91bb-47867cd0f2cc.png) ![Screenshot from 2021-05-18 11-19-00](https://user-images.githubusercontent.com/3050060/118626891-8acf0800-b7cb-11eb-9e3d-d2937b361524.png) r? `@jsha`
2021-05-18Rollup merge of #84462 - jsha:focus-search-results2, r=GuillaumeGomezRalf Jung-13/+19
rustdoc: use focus for search navigation Rather than keeping track of highlighted element inside the JS, take advantage of `.focus()` and the :focus CSS pseudo-class. This required wrapping each row of results in one big `<a>` tag (because anchors can be focused, but table rows cannot). That in turn required moving from a table layout to a div layout with float. This makes it so Ctrl+Enter opens links in new tabs, and using the arrow keys to navigate off the bottom of the page scrolls the rest of the page into view. It also simplifies the keyboard event handling. It eliminates the need for click handlers on the search results, and for tracking mouse movements. This changes the UI treatment of mouse hovering. A hovered element now gets a light grey background, but does not change the focus. It's possible to have two highlighted search results: one that is focused (via keyboard) and one that is hovered (via mouse). Pressing enter will activate the focused link; clicking will activate the hovered link. This matches up with how Firefox and Chrome handle suggestions in their URL bar, and avoids stray mouse movements changing the focus. Selecting tabs is now done with left/right arrows while any search result is focused. The visibility of results on each search tab is controlled with the "active" class, rather than by setting display: none directly. Note that the old code kept track of highlighted search element when tabbing back and forth. The new code doesn't. Demo at https://hoffman-andrews.com/rust/focus-search-results2/std/?search=fn Fixes #84384 Fixes #79962 Fixes #79872
2021-05-18Improve display for "copy-path" button, making it more discreteGuillaume Gomez-3/+2
2021-05-16rustdoc: restore header sizesJacob Hoffman-Andrews-3/+7
2021-05-15Rollup merge of #85289 - GuillaumeGomez:fix-toggle-position-mobile, r=jshaGuillaume Gomez-192/+198
Fix toggle position on mobile Before: ![Screenshot from 2021-05-14 14-21-27](https://user-images.githubusercontent.com/3050060/118276475-fe210300-b4c7-11eb-94f8-4e2a4e10d91e.png) ![Screenshot from 2021-05-14 14-21-30](https://user-images.githubusercontent.com/3050060/118276479-feb99980-b4c7-11eb-85db-40e9df6e9abd.png) After: ![Screenshot from 2021-05-14 15-16-54](https://user-images.githubusercontent.com/3050060/118276494-0416e400-b4c8-11eb-9479-d447928cfa62.png) ![Screenshot from 2021-05-14 15-16-59](https://user-images.githubusercontent.com/3050060/118276498-0416e400-b4c8-11eb-99f6-894276c62dfc.png) r? ```@jsha```
2021-05-15Rollup merge of #85256 - GuillaumeGomez:fix-implementors-display, r=notriddleGuillaume Gomez-1/+1
Fix display for "implementors" section Just saw this problem when going through docs: ![Screenshot from 2021-05-13 15-20-52](https://user-images.githubusercontent.com/3050060/118131978-766fc180-b3ff-11eb-86a8-7f6d22afa675.png) This fix puts it back to normal: ![Screenshot from 2021-05-13 15-23-29](https://user-images.githubusercontent.com/3050060/118132006-7e2f6600-b3ff-11eb-9985-025a7b7c5216.png) You can see it on the `TryFrom` page for example. r? ```@Nemo157```
2021-05-15chore: update comment in rustdoc.cssShinwoo Park-1/+1
2021-05-15rustdoc: avoid legacy Korean fonts in WindowsShinwoo Park-1/+9