Commit ff476b3
authored
Rollup merge of #92692 - jsha:cool-sidebar, r=GuillaumeGomez
Simplify and unify rustdoc sidebar styles
Fixes #59860
This switches to just use size, weight, and spacing to distinguish headings in the sidebar. We no longer use boxes, horizontal bars, or centering to distinguish headings. This makes it much easier to understand the hierarchy of headings, and reduces visual noise.
I also refactored how the mobile topbar works. Previously, we tried to shift around elements from the sidebar to make the topbar. Now, the topbar gets its own elements, which can be styled on their own. This makes styling and reasoning about those elements simpler.
Because the heading font sizes are bigger, increase the sidebar width slightly.
As a very minor change, removed version from the "All types" page. It's now only on the crate page.
struct - https://rustdoc.crud.net/jsha/cool-sidebar/std/vec/struct.Vec.html
trait - https://rustdoc.crud.net/jsha/cool-sidebar/std/io/trait.Read.html
crate - https://rustdoc.crud.net/jsha/cool-sidebar/std/index.html
mod - https://rustdoc.crud.net/jsha/cool-sidebar/std/any/index.html
macro - https://rustdoc.crud.net/jsha/cool-sidebar/std/macro.panic.html
fn - https://rustdoc.crud.net/jsha/cool-sidebar/std/io/fn.stdin.html
type alias - https://rustdoc.crud.net/jsha/cool-sidebar/std/io/type.Result.html
keyword - https://rustdoc.crud.net/jsha/cool-sidebar/std/keyword.as.html
primitive - https://rustdoc.crud.net/jsha/cool-sidebar/std/primitive.pointer.html
r? `@GuillaumeGomez`
cc `@camelid`
[Discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/sidebar.20headings).
Note: This has a lot of smaller commits, but I plan to squash them before merging.File tree
24 files changed
+228
-360
lines changed- src
- librustdoc
- html
- render
- static
- css
- themes
- js
- templates
- test
- rustdoc-gui
- rustdoc
24 files changed
+228
-360
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
| 557 | + | |
| 558 | + | |
567 | 559 | | |
568 | 560 | | |
569 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1744 | 1744 | | |
1745 | 1745 | | |
1746 | 1746 | | |
1747 | | - | |
1748 | | - | |
1749 | | - | |
1750 | | - | |
1751 | | - | |
1752 | | - | |
1753 | | - | |
1754 | 1747 | | |
1755 | 1748 | | |
1756 | 1749 | | |
| |||
1763 | 1756 | | |
1764 | 1757 | | |
1765 | 1758 | | |
| 1759 | + | |
1766 | 1760 | | |
| 1761 | + | |
1767 | 1762 | | |
1768 | | - | |
1769 | | - | |
1770 | | - | |
1771 | | - | |
1772 | | - | |
1773 | | - | |
1774 | | - | |
1775 | | - | |
| 1763 | + | |
1776 | 1764 | | |
1777 | | - | |
1778 | | - | |
1779 | | - | |
1780 | | - | |
1781 | | - | |
1782 | | - | |
1783 | | - | |
1784 | | - | |
1785 | | - | |
| 1765 | + | |
| 1766 | + | |
1786 | 1767 | | |
1787 | 1768 | | |
1788 | 1769 | | |
| |||
1806 | 1787 | | |
1807 | 1788 | | |
1808 | 1789 | | |
1809 | | - | |
| 1790 | + | |
1810 | 1791 | | |
1811 | 1792 | | |
1812 | 1793 | | |
| |||
0 commit comments