2021-07-17 17:03:08 -05:00
|
|
|
// This test ensures that the type declaration content overflow is handled inside the <pre> directly.
|
|
|
|
goto: file://|DOC_PATH|/lib2/long_table/struct.Foo.html
|
|
|
|
// We set a fixed size so there is no chance of "random" resize.
|
|
|
|
size: (1100, 800)
|
|
|
|
// Logically, the ".docblock" and the "<p>" should have the same scroll width.
|
|
|
|
compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"])
|
Simplify and unify rustdoc sidebar styles
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.
2022-01-06 18:48:24 -06:00
|
|
|
assert-property: (".top-doc .docblock", {"scrollWidth": "801"})
|
2021-07-17 17:03:08 -05:00
|
|
|
// However, since there is overflow in the <table>, its scroll width is bigger.
|
|
|
|
assert-property: (".top-doc .docblock table", {"scrollWidth": "1573"})
|
2021-09-08 08:09:47 -05:00
|
|
|
|
|
|
|
// Checking it works on other doc blocks as well...
|
|
|
|
|
|
|
|
// Logically, the ".docblock" and the "<p>" should have the same scroll width.
|
2021-12-12 11:28:58 -06:00
|
|
|
compare-elements-property: (
|
|
|
|
"#implementations + details .docblock",
|
|
|
|
"#implementations + details .docblock > p",
|
|
|
|
["scrollWidth"],
|
|
|
|
)
|
Simplify and unify rustdoc sidebar styles
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.
2022-01-06 18:48:24 -06:00
|
|
|
assert-property: ("#implementations + details .docblock", {"scrollWidth": "801"})
|
2021-09-08 08:09:47 -05:00
|
|
|
// However, since there is overflow in the <table>, its scroll width is bigger.
|
|
|
|
assert-property: ("#implementations + details .docblock table", {"scrollWidth": "1573"})
|