about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
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
2022-11-20rustdoc: factor out common button CSSMichael Howell-8/+4
2022-11-20Rollup merge of #104581 - notriddle:notriddle/js-iife-2, r=GuillaumeGomezMatthias Krüger-6/+3
rustdoc: remove unused JS IIFE from main.js This [IIFE] made sense when it was added in deaf5e200e79a75ac57d3f0952f6758a38168e52 and there was a local variable scoped to it, but now it calls a function, but declares nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2022-11-20Rollup merge of #104640 - GuillaumeGomez:migrate-kdb-css, r=notriddleMatthias Krüger-18/+12
Migrate kdb style to CSS variables r? `@notriddle`
2022-11-20Rollup merge of #104611 - notriddle:notriddle/scrape-examples-button, ↵Matthias Krüger-4/+13
r=GuillaumeGomez rustdoc: use real buttons for scrape examples controls This makes the expand and switch controls keyboard-accessible. Preview: https://notriddle.com/notriddle-rustdoc-demos/scrape-examples-button/test_dingus/fn.test.html
2022-11-20Migrate kdb colors to CSS variablesGuillaume Gomez-18/+12
2022-11-19rustdoc: fix scrape-examples JS pathMichael Howell-1/+1
2022-11-19rustdoc: use real buttons for scrape examples controlsMichael Howell-3/+12
2022-11-19Rollup merge of #104604 - GuillaumeGomez:migrate-top-button-to-css-var, ↵Matthias Krüger-27/+12
r=notriddle Migrate top buttons style to CSS variables No UI changes. r? `@notriddle`
2022-11-19Rollup merge of #104577 - GuillaumeGomez:remove-focus-on-blur, r=notriddleMatthias Krüger-9/+11
Don't focus on notable trait parent when hiding it I clicked on a notable trait icon so the popup remained and then clicked on the settings menu. When the settings menu was blurred, it scrolled back to when the notable trait was, which isn't great. r? `@notriddle`
2022-11-19Migrate top buttons style to CSS variablesGuillaume Gomez-27/+12
2022-11-19Rollup merge of #104566 - matthiaskrgr:clippy_perf_nov18, r=oli-obkDylan DPC-1/+1
couple of clippy::perf fixes
2022-11-19Fix invalid focus when blurring notable traits popoverGuillaume Gomez-8/+11
2022-11-18Auto merge of #104591 - Manishearth:rollup-b3ser4e, r=Manishearthbors-24/+19
Rollup of 8 pull requests Successful merges: - #102977 (remove HRTB from `[T]::is_sorted_by{,_key}`) - #103378 (Fix mod_inv termination for the last iteration) - #103456 (`unchecked_{shl|shr}` should use `u32` as the RHS) - #103701 (Simplify some pointer method implementations) - #104047 (Diagnostics `icu4x` based list formatting.) - #104338 (Enforce that `dyn*` coercions are actually pointer-sized) - #104498 (Edit docs for `rustc_errors::Handler::stash_diagnostic`) - #104556 (rustdoc: use `code-header` class to format enum variants) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-18Rollup merge of #104556 - notriddle:notriddle/variant, r=GuillaumeGomezManish Goregaokar-24/+19
rustdoc: use `code-header` class to format enum variants The font size and weights should be exactly the same after this PR, but the spacing is changed to be the same as methods. Preview: http://notriddle.com/notriddle-rustdoc-demos/variant/test_dingus_enum/enum.TestEnum.html
2022-11-18rustdoc: remove unused JS IIFE from main.jsMichael Howell-6/+3
This [IIFE] made sense when it was added in deaf5e200e79a75ac57d3f0952f6758a38168e52 and there was a local variable scoped to it, but now it calls a function, but declares nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2022-11-18Rollup merge of #104516 - notriddle:notriddle/flex-basis-sidebar-width, ↵Matthias Krüger-9/+4
r=GuillaumeGomez rustdoc: clean up sidebar width CSS This commit takes advantage of the ability to set [flex-basis] to a specific length instead of setting it to `auto` and changing min-/max-width, and setting flex-grow/-shrink both to 0. This PR should not cause any visual changes. preview: https://notriddle.com/notriddle-rustdoc-demos/flex-basis-sidebar-width/std/index.html [flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
2022-11-18Don't focus on notable trait parent when hiding itGuillaume Gomez-1/+0
2022-11-18couple of clippy::perf fixesMatthias Krüger-1/+1
2022-11-17rustdoc: use `code-header` class to format enum variantsMichael Howell-24/+19
The font size and weights should be exactly the same after this commit, but the spacing is changed to be exactly the same as methods.
2022-11-17Rollup merge of #104532 - GuillaumeGomez:migrate-tooltip-css, r=notriddleMatthias Krüger-31/+11
Migrate tooltip style to CSS variables
2022-11-17Rollup merge of #104503 - notriddle:notriddle/where, r=GuillaumeGomezMatthias Krüger-4/+1
rustdoc: remove redundant font-color CSS on `.where` Before 7f6ce7dddd49f453da15bb4d586a5990985814d8, light-theme where clauses had color `#4E4C4C` while the main color was `#000`. One of that commit's simplifications made it so that everything used the same black.
2022-11-17Rollup merge of #104366 - GuillaumeGomez:simplify-settings-theme-choice, ↵Matthias Krüger-24/+36
r=notriddle Simplify settings theme choice I removed the storage changes from https://github.com/rust-lang/rust/pull/98765 and only kept the UI changes. You can test it [here](https://rustdoc.crud.net/imperio/simplify-settings-theme-choice/foo/index.html). Discussion about this still in progress [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Last.20part.20of.20settings.20simplification). r? ````@notriddle````
2022-11-17Migrate tooltip style to CSS variablesGuillaume Gomez-31/+11
2022-11-16rustdoc: clean up sidebar width CSSMichael Howell-9/+4
This commit takes advantage of the ability to set [flex-basis] to a specific length instead of setting it to `auto` and changing min-/max-width, and setting flex-grow/-shrink both to 0. [flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
2022-11-16rustdoc: remove redundant font-color CSS on `.where`Michael Howell-4/+1
Before 7f6ce7dddd49f453da15bb4d586a5990985814d8, light-theme where clauses had color `#4E4C4C` while the main color was `#000`. One of that commit's simplifications made it so that everything used the same black.
2022-11-16Rollup merge of #104466 - notriddle:notriddle/crate-search-div-display, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `#crate-search-div { display: inline-block }` `#crate-search-div` is nested directly below `.search-results-title`, which has `display: inline-flex`. This makes the crate-search-div a [flex item], which makes its display property irrelevant, because flex items have their display [blockified] in any case. [flex item]: https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item [blockified]: https://www.w3.org/TR/css-flexbox-1/#flex-items
2022-11-16Rollup merge of #104462 - notriddle:notriddle/rightside-padding-right, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove pointless CSS `.rightside { padding-right: 2px }` This CSS was added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, as `.since { padding-right: 2px }`, to prevent it from uncomfortably touching the srclink, which were separate floated elements. It was carried forward with 962c0a4ee59e3c1a2413e785694c9433ffd0a9e1 to the new `.rightside`, but its role was replaced with adding " • " between them. All it does now is pushes the element 2px away from the page's right margin. Removing this rule changes the page layout, but you have to look for it to notice it.
2022-11-16Rollup merge of #104459 - notriddle:notriddle/main-js-iife, r=GuillaumeGomezMatthias Krüger-4/+2
rustdoc: remove unused JS IIFE from main.js This [IIFE] made sense when it was added in f0683f98fa114cc4f9e795031f44be3eebb65790 and there was a local variable scoped to it, but now it only sets two globals, so it does nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"