summary refs log tree commit diff
path: root/src/librustdoc/html/static/css
AgeCommit message (Collapse)AuthorLines
2023-05-22rustdoc: remove unneeded `position: relative` setting CSSMichael Howell-1/+0
This was added to control percentage sizes, in 79956b96e875e6ba2bfa551fabda6b7896f988ac Now, the only percentage size is [`border-radius`], which is based on the size of the box itself, not its containing block. This leaves the property unused. [`border-radius`]: https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
2023-05-22rustdoc: merge identical CSS rulesMichael Howell-5/+3
2023-05-03Rollup merge of #110371 - notriddle:notriddle/search-corrections, ↵Manish Goregaokar-0/+4
r=GuillaumeGomez rustdoc: restructure type search engine to pick-and-use IDs Fixes #110029 Preview: https://notriddle.com/rustdoc-demo-html-3/search-corrections/std/index.html?search=-%3E%20streaming ![image](https://user-images.githubusercontent.com/1593513/233494900-ae77d5b4-e395-41f8-bbac-53ee55bb4a76.png) This change makes it so, instead of mixing string distance with type unification, function signature search works by mapping names to IDs at the start, reporting to the user any cases where it had to make corrections, and then matches with IDs when going through the items. This only changes function searches. Name searches are left alone, and corrections are only done when there's a single item in the search query.
2023-04-21rustdoc: remove unused CSS `color: inherit`Michael Howell-1/+0
This code was added back when `border-color: currentColor` was used. Since it was changed in ad9a89eef2857a24ef049b9eee2d1db5bcbf1d11, the current color is not used any more.
2023-04-17rustdoc: restructure type search engine to pick-and-use IDsMichael Howell-0/+4
This change makes it so, instead of mixing string distance with type unification, function signature search works by mapping names to IDs at the start, reporting to the user any cases where it had to make corrections, and then matches with IDs when going through the items. This only changes function searches. Name searches are left alone, and corrections are only done when there's a single item in the search query.
2023-04-12Rollup merge of #110205 - notriddle:notriddle/pixelated-border, r=GuillaumeGomezMatthias Krüger-1/+5
rustdoc: make settings radio and checks thicker, less contrast This is very dependent on subjectivity and what screen you use, but this change makes the radio buttons' outer circle less ugly. This is because I could see the pixels very clearly, thanks to the very thin line and high contrast. This change makes both less severe, giving your browser's antialiasing algorithm more to work with. Since it's thicker, lowering the contrast shouldn't impact visibility. ## Preview https://notriddle.com/rustdoc-demo-html-3/pixelated-border/settings.html ## Before ![image](https://user-images.githubusercontent.com/1593513/231274191-143acbea-c433-4fb1-b46d-e5e4fe328d60.png) ## After ![image](https://user-images.githubusercontent.com/1593513/231287415-c1e59fe8-8bf8-489d-b607-95ebb71e4ac5.png) <details><summary>Original "after" image with 2px border around checked box</summary> ![image](https://user-images.githubusercontent.com/1593513/231274253-8b5011c6-82fb-4396-84d0-47b6bdff2260.png) </details>
2023-04-12rustdoc: use CSS `overscroll-behavior` instead of JavaScriptMichael Howell-1/+2
Fixes the desktop scrolling weirdness mentioned in https://github.com/rust-lang/rust/pull/98775#issuecomment-1182575603 As described in the MDN page for this property: * The current Firefox ESR is 102, and the first Firefox version to support this feature is 59. * The current Chrome version 112, and the first version to support this is 63. * Edge is described as having a minor bug in `none` mode, but we use `contain` mode anyway, so it doesn't matter. * Safari 16, released September 2022, is the last browser to add this feature, and is also the oldest version we officially support.
2023-04-12rustdoc: make settings radio and checks thicker, less contrastMichael Howell-1/+5
This is very dependent on subjectivity and what screen you use, but this change makes the radio buttons' outer circle less ugly. This is because I could see the pixels very clearly, thanks to the very thin line and high contrast. This change makes both less severe, giving your browser's antialiasing algorithm more to work with. Since it's thicker, lowering the contrast shouldn't impact visibility.
2023-04-06Rollup merge of #109977 - notriddle:notriddle/data-nosnippet, r=jsha,the8472Matthias Krüger-7/+7
rustdoc: avoid including line numbers in Google SERP snippets ![image](https://user-images.githubusercontent.com/1593513/230141184-9171c8e0-de92-48e6-85b6-8baee35e6d86.png)
2023-04-05rustdoc: avoid including line numbers in Google SERP snippetsMichael Howell-7/+7
2023-04-05Improve display of logo on very small screensGuillaume Gomez-1/+6
2023-04-04Move scrollbar on the <main> element rather than only on the code block to ↵Guillaume Gomez-0/+4
improve UX
2023-03-23rustdoc: remove old `content` hack for theme switchingMichael Howell-15/+0
This is based on the compatibility data for `window.matchMedia` and `MediaQueryList`'s `EventTarget` implementation. https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList#browser_compatibility https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia#browser_compatibility * EventTarget would require us to drop support for all Chrome versions before 39. However, we already require Chrome 49, because rustdoc requires [CSS variables]. * EventTarget would also limit us to Firefox 55, but since #106502 rustdoc only supports Firefox > 68. * EventTarget limits us to Mobile Safari version 14, but #102404 shows that our CSS is broken in Safari versions before 15.5. [CSS variables]: https://developer.mozilla.org/en-US/docs/Web/CSS/--*#browser_compatibility
2023-03-23rustdoc: clean up `storage.js`Michael Howell-1/+1
This converts a few functions to more compact versions of themselves, and moves `RUSTDOC_MOBILE_BREAKPOINT` to main.js where it's actually used.
2023-03-21rustdoc: remove redundant `.content` prefix from span/a colorsMichael Howell-21/+21
Reverts a1d4ebe4961c107272f9764d1908227a3cd04092, as well as fixing the problem it solved with links losing their color.
2023-03-02Put backtick content from rustdoc search errors into a <code> elementsGuillaume Gomez-0/+8
2023-02-19Rollup merge of #107783 - notriddle:notriddle/item-table-ul, r=GuillaumeGomezDylan DPC-7/+9
rustdoc: simplify DOM for `.item-table` This switches from using `<div>` to the more semantic `<ul>`, and using class names that rhyme with the classes the search results table uses.
2023-02-13Rollup merge of #107340 - notriddle:notriddle/simplify-doctest-tooltip, ↵Matthias Krüger-51/+9
r=GuillaumeGomez rustdoc: merge doctest tooltip with notable traits tooltip Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000 <details><summary>a user report where the tooltip arrow overlaps the text</summary> ![](https://cdn.discordapp.com/attachments/443150878111694848/1066420139530145812/this-example-is-not-tested-busted-rendering.png) </details> Fixes #91100 Preview: <https://notriddle.com/notriddle-rustdoc-demos/simplify-doctest-tooltip/std/vec/struct.Vec.html#indexing> Screenshot: ![image](https://user-images.githubusercontent.com/1593513/214975516-72667632-4609-49fa-8c37-e8d2ba1ba7dc.png)
2023-02-12rustdoc: use tighter line height in h1 and h2Michael Howell-0/+8
2023-02-07rustdoc: simplify DOM for `.item-table`Michael Howell-7/+9
This switches from using `<div>` to the more semantic `<ul>`, and using class names that rhyme with the classes the search results table uses.
2023-02-06Rollup merge of #107669 - notriddle:notriddle/ayu-smaller, r=GuillaumeGomezDylan DPC-34/+14
rustdoc: combine duplicate rules in ayu CSS
2023-02-04rustdoc: trait bound formattingRoland Strasser-0/+1
rustdoc: fix item-spacer rustdoc: use proper comment style rustdoc: change formatting where clauses for traits rustdoc: remove semicolon from provided methods update provided methods formatting
2023-02-04rustdoc: combine duplicate rules in ayu CSSMichael Howell-34/+14
2023-02-03Replace nbsp in all rustdoc code blocksMichael Howell-0/+2
Co-Authored-By: David Tolnay <dtolnay@gmail.com>
2023-02-02Rollup merge of #107531 - GuillaumeGomez:inline-images-in-css, r=notriddleMatthias Krüger-4/+13
Inline CSS background images directly into the CSS A nice advantage of this is that it removes a few entries in the list of static files. r? ``@notriddle``
2023-02-01Inline CSS background images directly into the CSSGuillaume Gomez-4/+13
2023-01-31Rollup merge of #107527 - notriddle:notriddle/wcagcontrast, r=GuillaumeGomezGuillaume Gomez-4/+0
rustdoc: stop making unstable items transparent Fixes #93393
2023-01-31Rollup merge of #107491 - notriddle:notriddle/setting-check, r=GuillaumeGomezGuillaume Gomez-2/+0
rustdoc: remove unused CSS from `.setting-check` These rules were needed for the mobile-style switches, but those were removed in 0f3ae6218ef1d9e9b14bf983b463785b14abc205
2023-01-31Rollup merge of #107354 - tspiteri:source-serif-4.005, r=GuillaumeGomezGuillaume Gomez-3/+11
rustdoc: update Source Serif 4 from 4.004 to 4.005 [Version 4.005](https://github.com/adobe-fonts/source-serif/releases/tag/4.005R) was released on 2023-01-20.
2023-01-31rustdoc: stop making unstable items transparentMichael Howell-4/+0
Fixes #93393
2023-01-31Rollup merge of #107477 - GuillaumeGomez:css-var, r=notriddleYuki Okushi-32/+21
Migrate last part of CSS themes to CSS variables No changes in the output. This is already tested in `tests/rustdoc-gui/search-tab.goml` so no need to add a GUI test. r? `@notriddle`
2023-01-30rustdoc: remove unused CSS from `.setting-check`Michael Howell-2/+0
These rules were needed for the mobile-style switches, but those were removed in 0f3ae6218ef1d9e9b14bf983b463785b14abc205
2023-01-30Migrate last part of CSS themes to CSS variablesGuillaume Gomez-32/+21
2023-01-30rustdoc: remove unnecessary wrapper div.item-decl from HTMLMichael Howell-1/+1
2023-01-27rustdoc: merge doctest tooltip with notable traits tooltipMichael Howell-51/+9
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000 Fixes #91100
2023-01-27add comment to rustdoc.css on updating filename suffixesTrevor Spiteri-0/+8
2023-01-27rustdoc: update Source Serif 4 from 4.004 to 4.005Trevor Spiteri-3/+3
Version 4.005 was released on 2023-01-20.
2023-01-26rustdoc: remove mostly-unused CSS classes import/module-itemMichael Howell-2/+1
2023-01-25Rollup merge of #107266 - kadiwa4:source_viewer_scrollbar, r=notriddleMatthias Krüger-1/+1
rustdoc: prohibit scroll bar on source viewer in Safari Fixes #106455.
2023-01-24rustdoc: prevent scroll bar on source viewerKaDiWa-1/+1
2023-01-23rustdoc: simplify settings popover DOMMichael Howell-16/+12
* Changes the class names so that they all start with `setting-`. That should make it harder to accidentally use a setting class outside the settings popover, where loading the CSS might accidentally change the styles of something unrelated. * Get rid of an unnecessary wrapper DIV around the radio button line. * Simplify CSS selectors by making the DOM easier and more intuitive to target.
2023-01-23Rollup merge of #107186 - GuillaumeGomez:correct-pseudo-element-selector, ↵Dylan DPC-4/+4
r=notriddle rustdoc: Use correct pseudo-element selector As explained [here](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements#syntax). I wrote it on top of #107152 so we'll need to wait for this one to be merged first. r? `@notriddle`
2023-01-22Rollup merge of #107152 - GuillaumeGomez:migrate-to-css-var, r=notriddleMatthias Krüger-21/+12
Migrate scraped-examples top and bottom "borders" to CSS variables r? `@notriddle`
2023-01-22Use correct pseudo-element selectorGuillaume Gomez-4/+4
2023-01-21Migrate scraped-examples top and bottom "borders" to CSS variablesGuillaume Gomez-21/+12
2023-01-20Rollup merge of #107131 - ↵Michael Goulet-6/+1
notriddle:notriddle/rustdoc-radio-display-inline-flex, r=GuillaumeGomez rustdoc: use CSS inline layout for radio line instead of flexbox This uses less code to lay them out the same way. Already tested here: https://github.com/rust-lang/rust/blob/5ce39f42bd2c8bca9c570f0560ebe1fce4eddb14/tests/rustdoc-gui/settings.goml#L123
2023-01-20Rollup merge of #107095 - notriddle:notriddle/sidebar-current, r=GuillaumeGomezMichael Goulet-1/+1
rustdoc: remove redundant CSS selector `.sidebar .current` Since the current sidebar item is already a link, it doesn't do anything.
2023-01-20rustdoc: use CSS inline layout for radio line instead of flexboxMichael Howell-6/+1
This uses less code to lay them out the same way.
2023-01-19rustdoc: remove redundant CSS selector `.sidebar .current`Michael Howell-1/+1
Since the current sidebar item is already a link, it doesn't do anything.
2023-01-18rustdoc: remove redundant rule `#settings .setting-line`Michael Howell-5/+1
Since the current version of settings.js always nests things below a div with ID `settings`, this rule always overrode the one above.