about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css/rustdoc.css
AgeCommit message (Collapse)AuthorLines
2022-09-01rustdoc: remove unused CSS `#main-content > .since`Michael Howell-1/+0
This rule was added (actually, it was called `#main > .since` back then) with cdca0843779eed0b9046e9fee48c91458ad51605 and you can see an example of the bug it's intended to fix in <https://doc.rust-lang.org/1.9.0/std/fmt/fn.write.html> by looking at the `1.0.0` version marker. However, a5a2f2b951ea982a666eaf52b1874d8f1b17290b changed it so that `<span class="since">` is always placed in an out-of-band wrapper, so it's never nested directly below `#main` / `#main-content` any more.
2022-09-01Rollup merge of #101292 - rust-lang:notriddle/rustdoc-table-first-child, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove unneeded CSS `.content table td:first-child > a` This rule was added in c1c6175e62189f8f0e6479bff7bac0e59a95a406 to benefit the module items table. However, the module items table stopped using table tags when 6020c79ddeafe8d9760b27c14c39da81bac9b4a6 switched us over to grid layout.
2022-09-01rustdoc: remove unneeded CSS `.content table td:first-child > a`Michael Howell-1/+0
This rule was added in c1c6175e62189f8f0e6479bff7bac0e59a95a406 to benefit the module items table. However, the module items table stopped using table tags when 6020c79ddeafe8d9760b27c14c39da81bac9b4a6 switched us over to grid layout.
2022-08-31rustdoc: remove unused `.docblock .impl-items` CSSMichael Howell-8/+0
The impl-items list stopped being nested inside a docblock since c1b1d6804bfce1aee3a95b3cbff3eaeb15bad9a4
2022-08-29rustdoc: remove unused CSS selectors for `.table-display`Michael Howell-35/+2
This class was added to support the function signature [src] lockup. That lockup was changed in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9 to use flexbox instead, leaving these selectors unused.
2022-08-27Rollup merge of #101063 - GuillaumeGomez:merge-duplicated-css, r=notriddleYuki Okushi-25/+8
Merge duplicated CSS rules I used the [stylelint](https://stylelint.io/user-guide/configure) tool to check for duplicated CSS rules in order to merge them. r? `@notriddle`
2022-08-27Rollup merge of #101046 - notriddle:notriddle/table-css, r=jshaYuki Okushi-1/+1
rustdoc: remove incorrect CSS selector `.impl-items table td` Fixes #100994 This selector was added in c7312fbae4979c6d4fdfbd1f55a71cd47d82a480. The bug can be seen at <https://doc.rust-lang.org/1.27.0/alloc/slice/trait.SliceIndex.html#foreign-impls>. This rule was added to help with a `<table>` that was used for displaying the function signature [src] lockup. That lockup was changed in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9 to use flexbox instead, leaving this selector unused (at least, for its original purpose).
2022-08-27Rollup merge of #101044 - notriddle:notriddle/css-hidden-by, r=jshaYuki Okushi-6/+0
rustdoc: remove unused CSS for `hidden-by-*-hider` This CSS seems to have become obsolete with the move to `<details>` tags, and its corresponding JavaScript was removed in aee054d05d8b795d35c0b448a4b731b6507aa459
2022-08-27Merge duplicated CSS rulesGuillaume Gomez-25/+8
2022-08-26rustdoc: remove incorrect CSS selector `.impl-items table td`Michael Howell-1/+1
Fixes #100994 This selector was added in c7312fbae4979c6d4fdfbd1f55a71cd47d82a480. The bug can be seen at <https://doc.rust-lang.org/1.27.0/alloc/slice/trait.SliceIndex.html#foreign-impls>. This rule was added to help with a `<table>` that was used for displaying the function signature [src] lockup. That lockup was changed in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9 to use flexbox instead, leaving this selector unused (at least, for its original purpose).
2022-08-26rustdoc: remove unused CSS for `hidden-by-*-hider`Michael Howell-6/+0
This CSS seems to have become obsolete with the move to `<details>` tags, and its corresponding JavaScript was removed in aee054d05d8b795d35c0b448a4b731b6507aa459
2022-08-26Rollup merge of #101012 - notriddle:notriddle/variants_table, r=jshaGuillaume Gomez-8/+0
rustdoc: remove unused CSS for `.variants_table` Continuation of #100938 and #101010. This rule was added to support the old, table-based style for displaying enum variants, which are now displayed using headers and paragraphs.
2022-08-26Rollup merge of #101010 - notriddle:notriddle/multi-column, r=jshaYuki Okushi-10/+0
rustdoc: remove unused CSS for `.multi-column` As a sanity check, [this tool] can be used to run a CSS query across an HTML tree to detect if a selector ever matches (I use compiler-docs and std docs). This isn't good enough, because I also need to account for JavaScript, but this class is never mentioned in any of the JS files, either. According to [blame], this class was added when rustdoc was first written, and, as far as I can tell, was never actually used. [this tool]: https://gitlab.com/notriddle/html-scanner [blame]: https://github.com/rust-lang/rust/blame/4d45b0745ab227feb9000bc15713ade4b99241ea/src/librustdoc/html/static/css/rustdoc.css#L753-L761
2022-08-25rustdoc: remove unused CSS for `.variants_table`Michael Howell-8/+0
Continuation of #100938 and #101010. This rule was added to support the old, table-based style for displaying enum variants, which are now displayed using headers and paragraphs.
2022-08-25rustdoc: remove unused CSS for `.multi-column`Michael Howell-10/+0
As a sanity check, [this tool] can be used to run a CSS query across an HTML tree to detect if a selector ever matches (I use compiler-docs and std docs). This isn't good enough, because I also need to account for JavaScript, but this class is never mentioned in any of the JS files, either. According to [blame], this class was added when rustdoc was first written, and, as far as I can tell, was never actually used. [this tool]: https://gitlab.com/notriddle/html-scanner [blame]: https://github.com/rust-lang/rust/blame/4d45b0745ab227feb9000bc15713ade4b99241ea/src/librustdoc/html/static/css/rustdoc.css#L753-L761
2022-08-23rustdoc: remove unused CSS ruleMichael Howell-4/+0
According to [blame], this rule was added to support enum struct variants. However, enum struct variants don't use tables in their design any more, so this rule does nothing. [blame]: https://github.com/rust-lang/rust/blame/87991d5f5d72d6baca490141cb890211ba2f3843/src/librustdoc/html/static/css/rustdoc.css#L748
2022-08-20Rollup merge of #100718 - GuillaumeGomez:fix-item-info, r=jshaMatthias Krüger-0/+1
[rustdoc] Fix item info display Fixes #100369. The solution I came up with was simply to wrap the "text part" of the `item-info` into another span so that `flex` wouldn't mess with it. Live demo is [here](https://rustdoc.crud.net/imperio/fix-item-info/foo/struct.ItemInfo.html). r? ``@jsha``
2022-08-18Fix item-info displayGuillaume Gomez-0/+1
2022-08-18Remove unused CSS ruleGuillaume Gomez-14/+0
2022-08-18Simplify rustdoc themes by relying more on CSS variablesGuillaume Gomez-38/+23
2022-08-10Two small improvements:Frank Steffahn-2/+2
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-11/+50
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-08-02Rollup merge of #99779 - GuillaumeGomez:fix-item-info-pos-and-height, ↵Matthias Krüger-1/+9
r=notriddle Fix item info pos and height Fixes https://github.com/rust-lang/rust/issues/98266. Fixes https://github.com/rust-lang/rust/issues/98343. You can test it [here](https://rustdoc.crud.net/imperio/fix-item-info-pos-and-height/lib2/trait.Trait.html). Here is a screenshot of the result: ![Screenshot from 2022-07-26 21-55-53](https://user-images.githubusercontent.com/3050060/181100624-18b8b045-5c25-4c7c-9c44-97d55d29b675.png) r? `@jsha`
2022-07-27Rollup merge of #99812 - GuillaumeGomez:fix-headings-colors, r=jsha,notriddleGuillaume Gomez-2/+2
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-1/+1
2022-07-27Fix invalid css property valueGuillaume Gomez-1/+1
2022-07-26Fix display of item info and unify their heightGuillaume Gomez-1/+9
2022-07-25Fix sidebar background-color on mobileGuillaume Gomez-1/+0
2022-07-22Rollup merge of #99423 - GuillaumeGomez:group-css-font-rule, r=notriddleDylan DPC-12/+9
Group CSS font rule Another CSS cleanup I came by when working on something else. r? ``@notriddle``
2022-07-20Remove CSS transition for search input border-colorGuillaume Gomez-1/+0
2022-07-20Fix crate filter select displayGuillaume Gomez-3/+1
2022-07-18Group CSS font ruleGuillaume Gomez-12/+9
2022-07-14Remove unused CSSGuillaume Gomez-2/+1
2022-07-11Continue themes CSS migration over CSS variablesGuillaume Gomez-0/+29
2022-07-10Rollup merge of #99086 - GuillaumeGomez:search-result-crate-filter-dropdown, ↵Matthias Krüger-1/+2
r=notriddle Fix display of search result crate filter dropdown In case a crate name is too long, the `<select>` completely overflows its parent. Another problem is that there is left margin on the `select` which break the alignment. You can see both issues here: ![Screenshot from 2022-07-09 15-31-12](https://user-images.githubusercontent.com/3050060/178108959-0eb5af19-ec60-4d34-a2fd-c27147683c78.png) And with the fix: ![Screenshot from 2022-07-09 15-33-37](https://user-images.githubusercontent.com/3050060/178108980-71030a92-84ee-4ee5-98e3-f97d03a6fbaf.png) cc `@jsha` r? `@notriddle`
2022-07-09Fix display of search result crate filter dropdownGuillaume Gomez-1/+2
2022-07-08set all padding for main element in printInfra-1/+1
2022-07-08try to fix tidy issuesInfra-10/+10
2022-07-08improve print stylesInfra-1/+11
this change removes some interactive elements in `@media print` form. more specifically, it removes the source links, the expand/collapse toggle buttons, and the `#copy-path` button. it also adjusts some spacing and removes the `.top-doc` description completely if it's currently collapsed.
2022-07-05Rollup merge of #98776 - notriddle:notriddle/mobile-sidebar-auto-close, ↵Dylan DPC-0/+10
r=GuillaumeGomez rustdoc: improve click behavior of the source code mobile full-screen "sidebar" On desktop, if you open the source code sidebar, it stays open even when you move from page to page. It used to do the same thing on mobile, but I think that's stupid. Since the file list fills the entire screen on mobile, and you can't really do anything with the currently selected file other than dismiss the "sidebar" to look at it, it's safe to assume that anybody who clicks a file in that list probably wants the list to go away so they can see it. Split out separately from #98772
2022-07-04Rollup merge of #98774 - notriddle:notriddle/source-code-sidebar-button, ↵Matthias Krüger-3/+19
r=GuillaumeGomez rustdoc: make source sidebar toggle a real button This fixes tab focus, so that you can open and close the sidebar from keyboard. This should cause no visible change in appearance at all. The only way you'd know anything different is if you tried to use keyboard controls to open the source code file navigation sidebar. Separated out from #98772
2022-07-03Rollup merge of #98773 - notriddle:notriddle/source-sidebar-details, ↵Ralf Jung-26/+11
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-03Remove redundant pseudo-classMichael Howell-1/+1
2022-07-02rustdoc: add test case for background color of the sidebar toggle buttonMichael Howell-1/+1
2022-07-02rustdoc: add explanatory comment to `width: 100%` lineMichael Howell-0/+1
2022-07-02rustdoc: make source sidebar toggle a real buttonMichael Howell-3/+18
This fixes tab focus, so that you can open and close the sidebar from keyboard.
2022-07-01rustdoc: add spacing to the source view sidebarMichael Howell-1/+5
https://user-images.githubusercontent.com/1593513/176974336-20cecdc3-1885-402a-a6d5-81a8dd03a45d.png
2022-07-01Rollup merge of #98460 - GuillaumeGomez:css-simplification, r=jshaGuillaume Gomez-5/+55
Use CSS variables to handle theming This is the start for our simplification of theming. Considering how big the diff quickly becomes, I think it's better to do it in multiple parts. (The 3 first commits come from https://github.com/rust-lang/rust/pull/98297 so once it's merged, they'll disappear). Normally they shouldn't be any UI changes. You can check it [here](https://rustdoc.crud.net/imperio/css-simplification/doc/foo/index.html). cc `@notriddle` r? `@jsha`
2022-07-01Rollup merge of #97249 - GuillaumeGomez:details-summary-fixes, r=notriddleGuillaume Gomez-2/+7
`<details>`/`<summary>` UI fixes With images it's easier to understand: ![Screenshot from 2022-05-21 14-10-42](https://user-images.githubusercontent.com/3050060/169653038-9c58de67-589a-4986-a8ff-dbdddaf136a4.png) ![Screenshot from 2022-05-21 14-08-49](https://user-images.githubusercontent.com/3050060/169653042-56e87258-13fe-4f80-9858-4e15c318c3fb.png) The headings in `<summary>` should not have bottom border so I removed it as well alongside the other fixes. r? `@jsha`
2022-07-01Improve click behavior of the source code mobile full-screen "sidebar"Michael Howell-0/+10
On desktop, if you open the source code sidebar, it stays open even when you move from page to page. It used to do the same thing on mobile, but I think that's stupid. Since the file list fills the entire screen on mobile, and you can't really do anything with the currently selected file other than dismiss the "sidebar" to look at it, it's safe to assume that anybody who clicks a file in that list probably wants the list to go away so they can see it.