about summary refs log tree commit diff
path: root/src/test/rustdoc-gui/sidebar.goml
diff options
context:
space:
mode:
authorJacob Hoffman-Andrews <github@hoffman-andrews.com>2022-02-05 05:05:05 -0800
committerJacob Hoffman-Andrews <github@hoffman-andrews.com>2022-02-08 03:09:10 -0800
commitdd5ff428edbc7cd4fa600b81f27bbec28589704f (patch)
tree4338507acc1c942340cdc8dda26a240640d8db22 /src/test/rustdoc-gui/sidebar.goml
parent03b17b181af4945fa24e0df79676e89454546440 (diff)
downloadrust-dd5ff428edbc7cd4fa600b81f27bbec28589704f.tar.gz
rust-dd5ff428edbc7cd4fa600b81f27bbec28589704f.zip
rustdoc: tweak line and ¶ spacing for a11y
The W3C Web Content Accessibility Guidelines specify a minimum line
spacing of 1.5 and a minimum paragraph spacing of 1.5 times the line
spacing. Our current line spacing (implemented by line-height) is 1.4,
so it's a small bump to go up to 1.5. Similarly, we have a paragraph
spacing of 0.6em. Bump that to 0.75em (which is 1.5 times the 0.5em
distance between lines).

Also, fix all the font sizes so instead of being round-ish numbers in
rem (like 1.1rem, 1.2rem), they are round numbers in pixels. Ensure each
font size is at least 2 pixels different than the nearest other font
size, so distinctions can be clearly seen. Overall the font-sizes are
mostly staying the same, being rounded up or down as appropriate.

Remove a few unused styles.

Simplify the display of the mobile-topbar location, by setting its
margins to auto rather than trying to size it exactly to the topbar.
Diffstat (limited to 'src/test/rustdoc-gui/sidebar.goml')
-rw-r--r--src/test/rustdoc-gui/sidebar.goml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/rustdoc-gui/sidebar.goml b/src/test/rustdoc-gui/sidebar.goml
index 877cc61b66f..9505e00512f 100644
--- a/src/test/rustdoc-gui/sidebar.goml
+++ b/src/test/rustdoc-gui/sidebar.goml
@@ -77,7 +77,7 @@ assert-text: ("#functions + .item-table .item-left > a", "foo")
 
 // Links to trait implementations in the sidebar should not wrap even if they are long.
 goto: file://|DOC_PATH|/lib2/struct.HasALongTraitWithParams.html
-assert-property: (".sidebar-links a", {"offsetHeight": 30})
+assert-property: (".sidebar-links a", {"offsetHeight": 29})
 
 // Test that clicking on of the "In <module>" headings in the sidebar links to the
 // appropriate anchor in index.html.