about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2022-12-02rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`Michael Howell-8/+2
2022-12-02Rollup merge of #105155 - notriddle:notriddle/flexbox-help-settings-buttons, ↵Matthias Krüger-19/+10
r=GuillaumeGomez rustdoc: clean up help and settings button CSS The old version of this code specified a bunch of different numbers that had to line up just right to get the size it wanted. This version uses flexbox centering, specifies the font size, and lets the browser figure out the rest of the layout automatically. Preview: http://notriddle.com/notriddle-rustdoc-demos/flexbox-help-settings-buttons/test_dingus/
2022-12-02Rollup merge of #105143 - notriddle:notriddle/scraped-example-list-font, ↵Matthias Krüger-3/+1
r=GuillaumeGomez rustdoc: use simpler CSS for setting the font on scraped examples
2022-12-02Rollup merge of #105132 - GuillaumeGomez:migrate-summary-toggle-to-var, ↵Matthias Krüger-8/+4
r=notriddle Migrate summary toggle filter to CSS variable r? `@notriddle`
2022-12-02Auto merge of #104963 - petrochenkov:noaddids2, r=cjgillotbors-9/+1
rustc_ast_lowering: Stop lowering imports into multiple items Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-12-01rustdoc: clean up help and settings button CSSMichael Howell-13/+8
The old version of this code specified a bunch of different numbers that had to line up just right to get the size it wanted. This version uses flexbox centering, specifies the font size, and lets the browser figure out the rest of the layout automatically.
2022-12-01rustdoc: clean up button-hiding mobile CSSMichael Howell-6/+2
2022-12-01rustdoc: use simpler CSS for setting the font on scraped examplesMichael Howell-3/+1
2022-12-01rustc_hir: Change representation of import paths to support multiple resolutionsVadim Petrochenkov-8/+0
2022-12-01Migrate summary toggle filter to CSS variableGuillaume Gomez-8/+4
2022-12-01rustc_hir: Relax lifetime requirements on `Visitor::visit_path`Vadim Petrochenkov-1/+1
2022-12-01Rollup merge of #105088 - notriddle:notriddle/search-results-div-desc, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove redundant CSS `div.desc { display: block }` DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748bb9b73c210558498070ae0b7ed8193ddf.
2022-11-30Rollup merge of #105086 - notriddle:notriddle/sidebar-css, r=GuillaumeGomezMatthias Krüger-7/+5
rustdoc: clean up sidebar link CSS Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes no sense to try to apply it to links with `overflow-wrap: anywhere`, because it can't actually make ellipses when that's turned on. Simplify the selector for the 25rem left padding on sidebar links, to match up with the style for the container left padding that makes room for it.
2022-11-30Rollup merge of #105064 - notriddle:notriddle/main-min-width, r=GuillaumeGomezMatthias Krüger-1/+1
rustdoc: add comment to confusing CSS `main { min-width: 0 }` This CSS was added in cad0fce2053d52b7ba04c458f4c124c8b5c6141e, but the reason why it was necessary was unclear. This comment makes it clear.
2022-11-30rustdoc: remove redundant CSS `div.desc { display: block }`Michael Howell-1/+0
DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748bb9b73c210558498070ae0b7ed8193ddf.
2022-11-30rustdoc: clean up sidebar link CSSMichael Howell-7/+5
Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes no sense to try to apply it to links with `overflow-wrap: anywhere`, because it can't actually make ellipses when that's turned on. Simplify the selector for the 25rem left padding on sidebar links, to match up with the style for the container left padding that makes room for it.
2022-11-29rustdoc: add comment to confusing CSS `main { min-width: 0 }`Michael Howell-1/+1
This CSS was added in cad0fce2053d52b7ba04c458f4c124c8b5c6141e, but the reason why it was necessary was unclear. This comment makes it clear.
2022-11-29rustdoc: use shorthand background for rustdoc toggle CSSMichael Howell-6/+2
2022-11-29Rollup merge of #105024 - notriddle:notriddle/fnname, r=jyn514Matthias Krüger-3/+2
rustdoc: remove `fnname` CSS class that's styled exactly like `fn` It's not obvious why this was ever a separate class name, since even in c4219a478354b464079b1b7ab081e071e8e39765 when it was first added, it was styled identically to regular `fn` links.
2022-11-29Rollup merge of #105020 - notriddle:notriddle/rustdoc-toggle, r=GuillaumeGomezMatthias Krüger-8/+1
rustdoc: merge background-image rules in rustdoc-toggle CSS
2022-11-28rustdoc: remove `fnname` CSS class that's styled exactly like `fn`Michael Howell-3/+2
It's not obvious why this was ever a separate class name, since even in c4219a478354b464079b1b7ab081e071e8e39765 when it was first added, it was styled identically to regular `fn` links.
2022-11-28rustdoc: merge background-image rules in rustdoc-toggle CSSMichael Howell-8/+1
2022-11-28Add sentence when rustdoc search is runningGuillaume Gomez-8/+12
2022-11-27Rollup merge of #104946 - notriddle:notriddle/popover-menu-focus, ↵Matthias Krüger-5/+17
r=GuillaumeGomez rustdoc: improve popover focus handling JS This commit fixes a few inconsistencies and erratic behavior from the notable traits, settings, and sidebar popups: * It makes it so that pressing Escape closes the mobile sidebar. This is a bit difficult to do on iPhone, but on other setups like desktop tiling window managers, it's easy and makes sense. * It makes sure that pressing escape while a notable trait popover is open focuses the popover's toggle button, instead of leaving nothing focused, since that makes more sense with keyboard navigation. Clicking the settings, help, or sidebar buttons, however, will not focus the notable trait popover toggle button. * It ensures that notable trait and settings popovers are exclusive with the mobile sidebar. Nothing should ever overlap a popover, and there should never be more than one popover open at once.
2022-11-26Fix UI issues with Rustdoc scrape-examples feature.Will Crichton-3/+5
* Help file was being loaded from the wrong place. * CSS selector in JS has a typo. * Line numbers are overflowing, change to display: grid to fix.
2022-11-26rustdoc: pass "true" to reset focus for notable traitsMichael Howell-11/+7
2022-11-26rustdoc: improve popover focus handling JSMichael Howell-5/+21
This commit fixes a few inconsistencies and erratic behavior from the notable traits, settings, and sidebar popups: * It makes it so that pressing Escape closes the mobile sidebar. This is a bit difficult to do on iPhone, but on other setups like desktop tiling window managers, it's easy and makes sense. * It makes sure that pressing escape while a notable trait popover is open focuses the popover's toggle button, instead of leaving nothing focused, since that makes more sense with keyboard navigation. Clicking the settings, help, or sidebar buttons, however, will not focus the notable trait popover toggle button. * It ensures that notable trait and settings popovers are exclusive with the mobile sidebar. Nothing should ever overlap a popover, and there should never be more than one popover open at once.
2022-11-26Rollup merge of #104928 - notriddle:notriddle/sidebar-toggle-flexbox, ↵Guillaume Gomez-9/+3
r=GuillaumeGomez rustdoc: use flexbox CSS to align sidebar button instead of position This accomplishes the same thing with significantly less code. Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-toggle-flexbox/src/test_dingus/lib.rs.html
2022-11-26Rollup merge of #104899 - notriddle:notriddle/help-dt, r=GuillaumeGomezMatthias Krüger-1/+0
rustdoc: remove no-op CSS `#help dt { display: block }` `display: block` is the [default UA style] for dt. [default UA style]: https://html.spec.whatwg.org/multipage/rendering.html#lists
2022-11-25rustdoc: use flexbox CSS to align sidebar button instead of positionMichael Howell-9/+3
This accomplishes the same thing with significantly less code.
2022-11-25rustdoc: remove no-op CSS `#help dt { display: block }`Michael Howell-1/+0
`display: block` is the [default UA style] for dt. [default UA style]: https://html.spec.whatwg.org/multipage/rendering.html#lists
2022-11-25rustdoc: revert tooltip background color on light theme to readableMichael Howell-1/+1
text #fff on background #fdffd3 fails the [WCAG color contrast checker], and seems like a mistake in 16b55903ee16503e7026677c169727d1907704c2. [WCAG color contrast checker]: https://accessibleweb.com/color-contrast-checker/
2022-11-25rustdoc: remove `cursor: pointer` from unclickable tooltipMichael Howell-1/+0
It's misleading unless it gets changed to respond to being clicked.
2022-11-25Rollup merge of #104849 - GuillaumeGomez:source-code-sidebar-css-migration, ↵Matthias Krüger-20/+14
r=notriddle Migrate source code elements style to CSS variables r? ``@notriddle``
2022-11-24Auto merge of #104845 - matthiaskrgr:rollup-tckj956, r=matthiaskrgrbors-2/+1
Rollup of 11 pull requests Successful merges: - #104514 (Use node_ty_opt to avoid ICE in visit_ty) - #104704 (Allow power10-vector feature in PowerPC) - #104747 (resolve: Don't use constructor def ids in the map for field names) - #104773 (OpaqueCast projections are always overlapping, they can't possibly be disjoint) - #104774 (Document split{_ascii,}_whitespace() for empty strings) - #104780 (make `error_reported` check for delayed bugs) - #104782 (Bump the const eval step limit) - #104792 (rustdoc: simplify `.search-results-title` CSS) - #104796 (lint: do not warn unused parens around higher-ranked function pointers) - #104820 (Remove normalize_projection_type) - #104822 (with_query_mode -> new) Failed merges: - #104716 (move 2 candidates into builtin candidate) - #104841 (Assert that we don't capture escaping bound vars in `Fn` trait selection) r? `@ghost` `@rustbot` modify labels: rollup
2022-11-24Migrate source code elements style to CSS variablesGuillaume Gomez-20/+14
2022-11-24Rollup merge of #104792 - notriddle:notriddle/crate-search-title-display, ↵Matthias Krüger-2/+1
r=GuillaumeGomez rustdoc: simplify `.search-results-title` CSS By using `display: flex`, we still get the never-wrapping layout with `#crate-search-div` maxing out and truncating its text. The title itself winds up always filling its parent, but since `#crate-search` doesn't have `flex-grow` set, it won't fill available space.
2022-11-24move things from rustc_target::abi to rustc_abihkalbasi-2/+2
2022-11-24make rustc_target usable outside of rustchkalbasi-4/+4
2022-11-24Rollup merge of #104772 - GuillaumeGomez:small-accessibility-improvement, ↵Matthias Krüger-18/+16
r=notriddle Small accessibility improvements From this [reddit post](https://www.reddit.com/r/rust/comments/z1gyz7/accessible_documentation/), I started to check a bit how to improve accessibility and how we could add test for it. So these two fixes come from the use of the [pa11y tool](https://github.com/pa11y/pa11y). To make it work, I had to update its puppeteer version to the last one but otherwise it seems to be quite nice. I didn't fix all the errors it reported because they were about colors. To get the same result as mine, you can use this config: ```json { "ignore": [ "WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail", "WCAG2AA.Principle3.Guideline3_2.3_2_2.H32.2" ] } ``` I think trying to improve accessibility is something we should definitely aim for. I'll try to integrate a tool to enforce this check (very likely `pa11y`) directly into the CI. cc ``@jsha`` r? ``@notriddle``
2022-11-23rustdoc: simplify `.search-results-title` CSSMichael Howell-2/+1
By using `display: flex`, we still get the never-wrapping layout with `#crate-search-div` maxing out and truncating its text. The title itself winds up always filling its parent, but since `#crate-search` doesn't have `flex-grow` set, it won't fill available space.
2022-11-23Rollup merge of #104744 - notriddle:notriddle/struct-fields-display-block, ↵Dylan DPC-0/+2
r=GuillaumeGomez rustdoc: give struct fields CSS `display: block` Fixes #104737
2022-11-23Improve accessibility:Guillaume Gomez-18/+16
* Set aria-label attribute on search input * Put anchor text directly into the DOM and not in the CSS
2022-11-22rustdoc: make struct fields `display: block`Michael Howell-0/+2
2022-11-22rustdoc: remove no-op CSS `a.test-arrow { display: inline-block }`Michael Howell-1/+0
Since this box is absolutely positioned, its display type is [blockified] anyway. We just need to make sure it isn't `display: none`. [blockified]: https://www.w3.org/TR/css-display-3/#transformations
2022-11-22rustdoc: remove no-op CSS `.popover::before { display: inline-block }`Michael Howell-1/+0
Since this box is absolutely positioned, its display type is [blockified] anyway. We just need to make sure it isn't `display: none`. [blockified]: https://www.w3.org/TR/css-display-3/#transformations
2022-11-22Auto merge of #103578 - petrochenkov:nofict, r=nagisabors-12/+12
Unreserve braced enum variants in value namespace With this PR braced enum variants (`enum E { V { /*...*/ } }`) no longer take a slot in value namespace, so the special case mentioned in the note in https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md#braced-structs is removed. Report - https://github.com/rust-lang/rust/pull/103578#issuecomment-1292594900.
2022-11-22Rollup merge of #104666 - GuillaumeGomez:migrate-alias-search-result, ↵Matthias Krüger-24/+16
r=notriddle Migrate alias search result to CSS variables r? `@notriddle`
2022-11-21Unreserve braced enum variants in value namespaceVadim Petrochenkov-12/+12
2022-11-21Migrate search result alias to CSS variablesGuillaume Gomez-24/+16