summary refs log tree commit diff
path: root/src/librustdoc/html/static/css/themes
AgeCommit message (Collapse)AuthorLines
2022-10-04Create new CSS variables for links colorGuillaume Gomez-78/+24
(cherry picked from commit 1c659977d6f2ff3b2d70cfb2607cd8725d9fbe03)
2022-09-16Remove unneeded empty ayu CSS rulesGuillaume Gomez-21/+3
2022-09-16Remove unused `.block a.current*` rulesGuillaume Gomez-48/+51
2022-09-16Remove some unused CSS rulesGuillaume Gomez-62/+18
2022-09-09Clean up themes a bit moreGuillaume Gomez-144/+12
2022-09-03Clean up themes CSSGuillaume Gomez-91/+21
2022-09-02Remove unused .toggle-label CSS ruleGuillaume Gomez-3/+0
2022-08-31Rollup merge of #100804 - GuillaumeGomez:search-results-color-ayu, r=notriddleYuki Okushi-3/+4
Fix search results color on hover for ayu theme Before: ![image](https://user-images.githubusercontent.com/3050060/185747851-038d2333-8b01-44a8-a104-ceb7410ac089.png) After: ![image](https://user-images.githubusercontent.com/3050060/185747869-53b502f5-5800-470f-b897-2683f1cdb7ee.png) You can test it [here](https://rustdoc.crud.net/imperio/search-results-color-ayu/foo/index.html?search=item). r? ``@jsha``
2022-08-27Merge duplicated CSS rulesGuillaume Gomez-5/+0
2022-08-26Rollup merge of #100956 - GuillaumeGomez:reduce-rightside-dom-size, r=notriddleGuillaume Gomez-3/+3
Reduce right-side DOM size This is another follow-up of https://github.com/rust-lang/rust/pull/100429 but not in code blocks this time. So the idea is: if there is only one element in the `.rightside` element, there is no need to wrap it, we can just create one node. On each page, I run this JS: `document.getElementsByTagName('*').length`. Important to note: the bigger the number of elements inside the page, the greater the gain. It also doesn't work very nicely on std docs because there are a lot of version annotations. So with this PR, It allows to get the following results: | file name | before this PR | with this PR | diff | |-|-|-|-| | std/default/trait.Default.html | 2189 | 1331 | 39.2% | | std/vec/struct.Vec.html | 14073 | 13842 | 1.7% | | std/fmt/trait.Debug.html | 5313 | 4907 | 7.7% | | std/ops/trait.Index.html | 642 | 630 | 1.9% | | gtk4/WidgetExt | 3269 | 3061 | 6.4% | You can test it [here](https://rustdoc.crud.net/imperio/reduce-rightsize-dom-size/gtk4/prelude/trait.WidgetExt.html). r? `@notriddle`
2022-08-24Remove the extra DOM level if there is only one child in rightside elementsGuillaume Gomez-3/+3
2022-08-24rustdoc: ayu code color selector more specificMichael Howell-1/+1
According to https://github.com/rust-lang/rust/pull/100960#issuecomment-1225970579, this selector is only really intended to apply to item info. However, it's so broad that it's hard to tell when it deliberately applies vs where it accidentally applies.
2022-08-20Fix hover and focus display for search results on ayu themeGuillaume Gomez-3/+4
2022-08-18Simplify rustdoc themes by relying more on CSS variablesGuillaume Gomez-190/+7
2022-08-14Don't generate ident elements as DOM nodesGuillaume Gomez-7/+3
2022-08-12Rollup merge of #100409 - jsha:highlight-lighter, r=GuillaumeGomezDylan DPC-2/+2
rustdoc: don't generate DOM element for operator In our source page highlighting, we were generating `<span class="op">` tags for all "operators", including e.g. `<` `>` around generic parameters, `*`, `&`. This contributed significantly to DOM size, but we don't actually style `.op` except in the ayu theme. Remove the styles for `.op` in ayu, and stop generating the `<span>`s. This reduces DOM size of an example page[1] from 265,938 HTML elements to 242,165 elements, a 9% reduction. r? ``@GuillaumeGomez`` Demo: (warning - slow!) https://rustdoc.crud.net/jsha/highlight-lighter/src/core/up/up/stdarch/crates/core_arch/src/x86/avx512f.rs.html [1]: https://doc.rust-lang.org/nightly/src/core/up/up/stdarch/crates/core_arch/src/x86/avx512f.rs.html
2022-08-11rustdoc: don't generate DOM element for operatorJacob Hoffman-Andrews-2/+2
In our source page highlighting, we were generating `<span class="op">` tags for all "operators", including e.g. `<` `>` around generic parameters, `*`, `&`. This contributed significantly to DOM size, but we don't actually style `.op` except in the ayu theme. Remove the styles for `.op` in ayu, and stop generating the `<span>`s. This reduces DOM size of an example page[1] from 265,938 HTML elements to 242,165 elements, a 9% reduction. [1]: https://doc.rust-lang.org/nightly/src/core/up/up/stdarch/crates/core_arch/src/x86/avx512f.rs.html
2022-08-11Rollup merge of #100374 - ↵Matthias Krüger-7/+36
GuillaumeGomez:improve_rustdoc_search_results_page_crates_selection, r=notriddle Improve crate selection on rustdoc search results page Take over of #98855 (screenshots and explanations are there). You can test it [here](https://rustdoc.crud.net/imperio/improve_rustdoc_search_results_page_crates_selection/std/index.html?search=test). cc ``@steffahn`` ``@jsha`` r? ``@notriddle``
2022-08-10rustdoc: make item-infos dimmer on dark theme #93896Jacob Hoffman-Andrews-23/+8
Previously the item-info background colors were too bright for a dark theme, making a bright rectangle that draws the attention.
2022-08-10Two small improvements:Frank Steffahn-1/+0
Fix oversight duplicate property left in CSS (dark theme). Improve wording in comment that mentions `appearance: none`
2022-08-10Improve crate selection on rustdoc search results pageFrank Steffahn-7/+37
Resolves all of issue #93240 Reproduces a similar change as #99086, but with improvements In particular, this PR inlcludes: * redesigning the crate-search selector so the background color matches its surroundings * decrease the font of the dropdown menu to a reaonable size * add a hover effect * make the color of the arrow theme-dependent, using a surrounding div, with :after pseudo-element that can then be transformed using CSS filters to approximate the desired color * fix the text "in" to match the title font * remove the "for xyz" in the "Results for xyz in [All crates]" title when searching for search term "xyz"; you can already see what you're searching for as it's typed in the search bar! * in line with #99086, handle super-long crate names appropriately without a long <select> element escaping the screen area; the improvement is that we also keep the title within a single line now; uses some flex layout shenanigans... * the margins / paddings are adjusted so the selected label of the <select> fits within the rest of that title nicely; also some inconsistency in the way that Firefox renders a <select> with "appearance: none" (roughly 4px more padding left and right of the text than e.g. Chrome) is worked around, and it now produces a result that looks (essentially) identical to Chrome * the color of the help menu and settings menu border in light theme is made to match with the color of the corresponding buttons, like they do (match) in the ayu theme * the casing of "All crates" changes to "all crates" * the new tests from #99086 are temporarily disabled, until they can be adapted later
2022-07-27Rollup merge of #99812 - GuillaumeGomez:fix-headings-colors, r=jsha,notriddleGuillaume Gomez-4/+0
Fix headings colors Fixes #99797. ![image](https://user-images.githubusercontent.com/3050060/181260966-49faf9d3-f6b8-4de4-bc7d-ed9f0467cf68.png) cc `@jsha` r? `@notriddle`
2022-07-27Fix headings borderGuillaume Gomez-4/+0
2022-07-24Satisfy theme checkMaybe Waffle-0/+1
2022-07-24Add support for `#[rustc_must_implement_one_of]` to rustdocMaybe Waffle-1/+4
2022-07-20Fix CSS on search input focusGuillaume Gomez-3/+21
2022-07-14Remove unused CSSGuillaume Gomez-44/+5
2022-07-11Continue themes CSS migration over CSS variablesGuillaume Gomez-130/+16
2022-07-11Remove unused CSS rulesGuillaume Gomez-33/+0
2022-07-10Group .test-arrow CSS rules and fix rgb/rgba propertyGuillaume Gomez-7/+3
2022-07-03Rollup merge of #98773 - notriddle:notriddle/source-sidebar-details, ↵Ralf Jung-7/+9
r=GuillaumeGomez rustdoc: use <details> tag for the source code sidebar This fixes the extremely poor accessibility of the old system, making it possible to navigate the sidebar by keyboard, and also implicitly gives the sidebar items the correct ARIA roles. Split out separately from #98772
2022-07-01rustdoc cleanup: remove unused functionMichael Howell-4/+3
2022-07-01rustdoc: use <details> tag for the source code sidebarMichael Howell-3/+6
This fixes the extremely poor accessibility of the old system, making it possible to navigate the sidebar by keyboard, and also implicitly gives the sidebar items the correct ARIA roles.
2022-06-28Simplify CSS theming by setting CSS variablesGuillaume Gomez-199/+18
2022-06-28Remove unused CSS rulesGuillaume Gomez-12/+0
2022-06-26Rollup merge of #98297 - GuillaumeGomez:help-pocket-menu, r=notriddleMatthias Krüger-12/+15
Transform help popup into a pocket menu Just like we moved the settings menu into a "pocket menu", it's doing the same to the help popup. You can test it [here](https://rustdoc.crud.net/imperio/help-pocket-menu/doc/foo/index.html) and here is a screenshot: ![Screenshot from 2022-06-20 20-58-29](https://user-images.githubusercontent.com/3050060/174663718-538e9d11-3bf9-48b2-8909-f9bfe75af135.png) r? ``````````@jsha``````````
2022-06-25Fix CSS rule for selected and hovered items in the source sidebarGuillaume Gomez-6/+6
2022-06-23Move help popup into a pocket menu as wellGuillaume Gomez-12/+15
2022-05-31Fix theme checksGuillaume Gomez-0/+3
2022-05-31Display empty impl blocks if they have documentationsGuillaume Gomez-1/+4
2022-05-30Move theme rules out of settings.cssGuillaume Gomez-7/+39
2022-05-30Improve display of settings radio buttonsGuillaume Gomez-6/+57
2022-05-17Fix display of search crate filter selectGuillaume Gomez-5/+6
2022-05-14Remove theme picker buttonGuillaume Gomez-28/+7
2022-05-14Improve settings menu displayGuillaume Gomez-3/+15
2022-03-27Add scrape examples help pageWill Crichton-6/+6
2022-03-27Improve styling on scrape examples help buttonWill Crichton-10/+10
2022-03-27Improve alignment of additional scraped examples, add scrape examples help pageWill Crichton-4/+57
2022-02-07Fix hover effects in sidebarJacob Hoffman-Andrews-21/+11
The dark and ayu themes have a menu-like highlight on sidebar items. The light theme used to, but it was accidentally lost in the sidebar unification. The change brings back the hover effect in the light theme. It also makes the hover effect apply consistently to all links in the sidebar, including headings. It also simplifies the "In _path_" heading so it's one big link. The breadcrumbs are still readily available at the top of the page.
2022-01-31Rollup merge of #93444 - camelid:rustdoc-css-cleanup, r=GuillaumeGomez,jshaMatthias Krüger-6/+8
Fix some CSS warnings and errors from VS Code There's no such CSS rule as `box-shadow-color`, so I instead copied the whole `box-shadow` property to each rule to make it actually apply. r? `@jsha`