about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css
AgeCommit message (Collapse)AuthorLines
2021-11-20Reduce prominence of item-infosJacob Hoffman-Andrews-3/+1
- Remove border. - Reduce size of emoji slightly. - Remove details disclosure for unstable reason. This was inconsistent with our other details disclosures, and the detail revealed was usually better explained by clicking on the issue link.
2021-11-20Rollup merge of #90089 - jsha:enum-fields-headings, r=camelid,GuillaumeGomezMatthias Krüger-13/+16
Improve display of enum variants Use h3 and h4 for the variant name and the "Fields" subheading. Remove the "of T" part of the "Fields" subheading. Remove border-bottom from "Fields" subheading. Move docblock below "Fields" listing. Fixes #90061 Demo: https://jacob.hoffman-andrews.com/rust/xmlparser-updated/xmlparser/enum.Token.html#variants https://jacob.hoffman-andrews.com/rust/fix-enum-variants/std/io/enum.ErrorKind.html#variants https://jacob.hoffman-andrews.com/rust/fix-enum-variants/std/result/enum.Result.html#variants r? ``@camelid``
2021-11-17Make scrollbar in the sidebar always visible for visual consistencyGuillaume Gomez-4/+4
2021-11-04Fix missing bottom border for headings in sidebarGuillaume Gomez-1/+2
2021-10-31Hide search bar in noscript.cssJacob Hoffman-Andrews-12/+9
Also, remove the highlighting of the search bar in disabled state. This reduces flicker when loading a page.
2021-10-30Improve display of enum variantsJacob Hoffman-Andrews-13/+16
Use h3 and h4 for the variant name and the "Fields" subheading. Remove the "of T" part of the "Fields" subheading. Remove border-bottom from "Fields" subheading. Move docblock below "Fields" listing.
2021-10-30Remove underlines from non-top docblocks.Jacob Hoffman-Andrews-2/+9
We still had a number of places where underlined section headings would show up, like under Implementations.
2021-10-27Rollup merge of #90232 - konan8205:master, r=GuillaumeGomezMatthias Krüger-6/+6
rustdoc: Use TTF based font instead of OTF for CJK glyphs to improve readability Due to Windows' implementation of font rendering, OpenType fonts can be distorted. So the existing font, Noto Sans KR, is not very readable on Windows. This PR improves readability of Korean glyphs on Windows. ## Before ![원1](https://user-images.githubusercontent.com/11029378/138592394-16b15787-532d-4421-a5eb-ed85675290fa.png) ## After ![원2](https://user-images.githubusercontent.com/11029378/138592409-f3a440ee-f0fc-40e4-9561-42c479439c9f.png) The fonts included in this PR are licensed under the SIL Open Font License and generated with these commands: ```sh pyftsubset NanumBarunGothic.ttf \ --unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \ --output-file=NanumBarunGothic.ttf.woff --flavor=woff ``` ```sh pyftsubset NanumBarunGothic.ttf \ --unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \ --output-file=NanumBarunGothic.ttf.woff2 --flavor=woff2 ``` r? ``@GuillaumeGomez``
2021-10-26rustdoc: use ttf based font for cjk glyphsShinwoo Park-6/+6
2021-10-25Fix scrollbars appearing on information tooltip on mac when they shouldn'tGuillaume Gomez-1/+1
2021-10-24Rollup merge of #90155 - jsha:outdent-methods, r=GuillaumeGomez,camelidMatthias Krüger-18/+10
Fix alignment of method headings for scannability We sometimes use indentation to indicate something is a heading: The section that comes after is indented by 24px relative to the heading. However, the relationship between the "Implementations" section heading, the `impl` headings it contains, and the `pub fn` subheadings within each impl, is awkward. It goes **Implementations**, 15px indent, `impl`, 5px indent, `pub fn`, 4px indent, docblock. I line up `impl` and `pub fn` with the `Implementations` heading, give `impl` a larger font size to indicate it is higher in the hierarchy, and indent the docblock a full 24px relative to their parent, matching the indents we use elsewhere to distinguish section headings. By letting the `pub fn` stick out to the left of the docblock, I think this makes methods significantly more scannable. Related to #59829 r? `````@camelid````` [Old](https://doc.rust-lang.org/nightly/std/string/struct.String.html#implementations): [![image](https://user-images.githubusercontent.com/220205/138380233-9c63a0f2-0f80-40a3-ab3d-a1ee9fb7c5d8.png)](https://doc.rust-lang.org/nightly/std/string/struct.String.html#implementations) [New](https://jacob.hoffman-andrews.com/rust/outdent-methods/std/string/struct.String.html#implementations): [![image](https://user-images.githubusercontent.com/220205/138392479-b45fce3f-bf43-42e0-81ee-c4bb9ac35cda.png)](https://jacob.hoffman-andrews.com/rust/outdent-methods/std/string/struct.String.html#implementations)
2021-10-23Outdent method headings so they stand outJacob Hoffman-Andrews-18/+10
The makes the heading / documentation distinction clearer.
2021-10-23Rollup merge of #85833 - willcrichton:example-analyzer, r=jyn514Matthias Krüger-0/+206
Scrape code examples from examples/ directory for Rustdoc Adds support for the functionality described in https://github.com/rust-lang/rfcs/pull/3123 Matching changes to Cargo are here: https://github.com/rust-lang/cargo/pull/9525 Live demo here: https://willcrichton.net/example-analyzer/warp/trait.Filter.html#method.and
2021-10-19Small scrape-example fixesWill Crichton-1/+6
2021-10-20Rollup merge of #90036 - jsha:less-rule, r=GuillaumeGomezYuki Okushi-5/+8
Remove border-bottom from most docblocks. Headings in the top-doc docblock still get a border-bottom due to a rule that covers all h2, h3, and h4. Method docblocks are generally h5, and so don't get a border-bottom anymore. This fixes a problem where a sub-sub-heading within a method would have a line that went all the way across the page, creating a division that made that sub-sub-heading look much more important than it really is. Fixes #90033 Demo at https://jacob.hoffman-andrews.com/rust/less-rule/std/string/struct.String.html r? ``@GuillaumeGomez``
2021-10-20Rollup merge of #90018 - GuillaumeGomez:too-long-item-names, r=jshaYuki Okushi-4/+8
Fix rustdoc UI for very long type names Fixes #89972. While working on it, I also discovered that when the item name is too long, it also breaks the flow of the page. To make things right, I also renamed the `type-decl` CSS class into `item-decl` (because this PR also generates it for more than type declarations). So here are the before/after screenshots: ![Screenshot from 2021-10-18 16-58-03](https://user-images.githubusercontent.com/3050060/137757247-637fcf04-4406-49c6-8a8a-18c2074aacd9.png) ![Screenshot from 2021-10-18 16-58-26](https://user-images.githubusercontent.com/3050060/137757252-17935e63-53b3-449f-a535-7be91ff0e257.png) ![Screenshot from 2021-10-18 16-58-07](https://user-images.githubusercontent.com/3050060/137757278-8b12e348-2980-4fc4-8853-bef99d58981f.png) ![Screenshot from 2021-10-18 16-58-28](https://user-images.githubusercontent.com/3050060/137757282-534a0e1b-3016-49ba-b3ac-e45bdb9035cb.png) r? ``@jsha``
2021-10-18Reduce margin on h5 and h6Jacob Hoffman-Andrews-1/+8
2021-10-18Remove border-bottom from most docblocks.Jacob Hoffman-Andrews-4/+0
Headings in the top-doc docblock still get a border-bottom due to a rule that covers all h2, h3, and h4. Method docblocks are generally h5, and so don't get a border-bottom anymore. This fixes a problem where a sub-sub-heading within a method would have a line that went all the way across the page, creating a division that made that sub-sub-heading look much more important than it really is.
2021-10-18Prevent documentation page title to grow too bigGuillaume Gomez-0/+1
2021-10-18* Remove left margin on items declaration at the top of their documentation pageGuillaume Gomez-4/+7
* Rename "type-decl" into "item-decl" to reflect the change of usage
2021-10-12rustdoc: update noto sans krShinwoo Park-3/+4
2021-10-11Cleanup .item-table CSSStefan Schindler-1/+1
2021-10-11Rollup merge of #89736 - GuillaumeGomez:rm-unused-css-rule, r=dns2utf8Matthias Krüger-2/+0
Remove unused CSS rule As you can see in the firefox devtools: ![Screenshot from 2021-10-10 14-28-08](https://user-images.githubusercontent.com/3050060/136695689-16c77ceb-b1ab-40df-963a-048f2258e217.png) It needs the display to be `grid` or `inline-grid`, which isn't the case. r? `@dns2utf8`
2021-10-10Remove unused CSS ruleGuillaume Gomez-2/+0
2021-10-10Fix <code> blocks in doc blocks display on mobileGuillaume Gomez-0/+4
2021-10-08Move more scrape-examples logic from JS to rustWill Crichton-0/+1
Fix failing test Add missing backslash Fix padding issue with horizontal scrollbar
2021-10-07Move some expansion logic into generation-time, fix section header links, ↵Will Crichton-4/+8
remove ID from line numbers, fix horizontal scrolling on non-expanded elements
2021-10-06Update to latest rustc and rustdoc stylesWill Crichton-4/+4
2021-10-06Incorporate jyn's feedbackWill Crichton-4/+0
* Move call location logic from function constructor to rendering * Fix issue with macro spans in scraping examples * Clean up example loading logic Documentation / newtype for DecorationInfo Fix line number display Serialize edition of call site, other small cleanup
2021-10-06Add styles for non-white themesWill Crichton-1/+47
Tweak colors Tabs New link heading style
2021-10-06Reduce blur size, fix example width bug, add better error handling for I/O ↵Will Crichton-4/+9
issues Remove repository url Fix formatting Fix file_span in print_src Formatting
2021-10-06Move highlighting logic from JS to RustWill Crichton-9/+13
Continue migrating JS functionality Cleanup Fix compile error Clean up the diff Set toggle font to sans-serif
2021-10-06Sort examples by sizeWill Crichton-9/+49
Improve styling Start to clean up code, add comments
2021-10-06Generate example source files with corresponding linksWill Crichton-1/+1
Add display name Fix remaining merge conflicts Only embed code for items containing examples
2021-10-06Factor scraping and rendering into separate calls to rustdocWill Crichton-8/+5
Simplify toggle UI logic, add workspace root for URLs
2021-10-06Fix check issueWill Crichton-1/+2
Clean up tidy checks
2021-10-06Add updated support for example-analyzerWill Crichton-0/+107
Move rendering of examples into Finalize design Cleanup, rename found -> scraped Softer yellow Clean up dead code Document scrape_examples More simplification and documentation Remove extra css Test
2021-10-06Rollup merge of #89506 - yaymukund:docblock-headings, r=GuillaumeGomezManish Goregaokar-13/+12
librustdoc: Use correct heading levels. Closes #89309 This fixes the `<h#>` header tags throughout the docs to reflect a semantic hierarchy. - I ran a script to manually check that we don't have any files with multiple `<h1>` tags. - Also checked that we never incorrectly nest e.g. a `<h2>` under an `<h3>`. - I also spot-checked a bunch of pages (`trait.Read`, `enum.Ordering`, `primitive.isize`, `trait.Iterator`).
2021-10-06Restore h1 styles, which got accidentally removed.Mukund Lakshman-3/+3
2021-10-04librustdoc: Use correct heading levels.Mukund Lakshman-13/+12
- Avoid multiple <h1>s on a page. - The <h#> tags should follow a semantic hierarchy. - Cap at h6 (no h7)
2021-10-03Move from grid layout to table based layout because of browser limits that ↵Stefan Schindler-10/+9
overlay row entries after a UA specific amount of rows
2021-09-17Add rustdoc version into the help popupGuillaume Gomez-9/+18
2021-09-12Fix invalid background for jump-to-def links in source code pagesGuillaume Gomez-1/+1
2021-09-08Wrap <table> elements into <div> to prevent breaking layout and widthGuillaume Gomez-0/+5
2021-08-28Fix code blocks color in ayu themeGuillaume Gomez-1/+1
2021-08-19Rollup merge of #88093 - Kobzol:rustdoc-wrap-code-in-code-tag, r=GuillaumeGomezGuillaume Gomez-1/+0
[rustdoc] Wrap code blocks in <code> tag This PR modifies Rustdoc output so that fenced code snippets, items and whole file source codes are wrapped in `<pre><code>` instead of just `<pre>`. This should improve the semantic meaning of the generated content. I'm not sure what to do about `render_attributes_in_pre` and `render_attributes_in_code`. These functions were clearly expected to be used for things inside `<pre>` or `<code>`, and since I added `<code>` in this PR, some of them will be used in a different context than before. However, it seems to me that even before they were not consistent. For example, `item_constant` used `render_attributes_in_code` for its attributes, however there was no `<code>` used for constants before this PR... Should I create some `rustdoc-gui` tests? For example to check that all `<pre>` tags have a `<code>` child? Fixes: https://github.com/rust-lang/rust/issues/88020
2021-08-19[rustdoc] Wrap code blocks in <code> tagJakub Beránek-1/+0
2021-08-18Rollup merge of #88111 - GuillaumeGomez:background-color-jump-to-def, r=jhprattGuillaume Gomez-0/+9
Add background-color on clickable definitions in source code Someone suggested to add a decoration on clickable elements in the source code pages: ![Screenshot from 2021-08-17 14-49-39](https://user-images.githubusercontent.com/3050060/129728911-def74f9e-50e2-40d2-b512-e23f1b3d0409.png) ![Screenshot from 2021-08-17 14-49-47](https://user-images.githubusercontent.com/3050060/129728925-14aec500-82ff-4336-955a-4173c769deeb.png) ![Screenshot from 2021-08-17 14-49-52](https://user-images.githubusercontent.com/3050060/129728927-a8a89d7a-e837-4ff5-b094-35be23629d14.png) The idea is to not disturb the reading while telling the reader "you can click on this one", which is why it's not a text decoration. What do you think `@rust-lang/rustdoc` ? r? `@Nemo157`
2021-08-18Fix anchors display in rustdocGuillaume Gomez-5/+9
2021-08-17Add background-color on clickable definitions in source codeGuillaume Gomez-0/+9