diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-02-12 22:29:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-12 22:29:50 +0100 |
| commit | 1d4397ba70cccaf67911316549f4edb15b077cd1 (patch) | |
| tree | 46d99084dafece236c36ba1d81a4b6d7a3b2489e /src/librustdoc/html/static/css/rustdoc.css | |
| parent | f81cb97cb20b7a3f625f8a73b343c27d938bb9b9 (diff) | |
| parent | b0df355f80647ca94e6676e1f5bd6990ae17086e (diff) | |
| download | rust-1d4397ba70cccaf67911316549f4edb15b077cd1.tar.gz rust-1d4397ba70cccaf67911316549f4edb15b077cd1.zip | |
Rollup merge of #107964 - notriddle:notriddle/title-line-height, r=GuillaumeGomez
rustdoc: use tighter line height in h1 and h2 This keeps the line height for body text the same, as required by WCAG, but for headers, it makes sense to have wrapped lines be a bit tighter packed. ## Before  ## After 
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 2a9548712f0..4f8f00f298a 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -174,6 +174,14 @@ h1, h2, h3, h4 { .top-doc .docblock > h4 { border-bottom: 1px solid var(--headings-border-bottom-color); } +/* while line-height 1.5 is required for any "block of text", + which WCAG defines as more than one sentence, it looks weird for + very large main headers */ +h1, h2 { + line-height: 1.25; + padding-top: 3px; + padding-bottom: 9px; +} h3.code-header { font-size: 1.125rem; /* 18px */ } |
