From 8217c4fd70a6196ed779e47df6421449b140a0ea Mon Sep 17 00:00:00 2001 From: cynecx Date: Sun, 15 Mar 2020 00:49:19 +0100 Subject: [PATCH] Add anchor-workaround for 'small-section-header' and method heading --- templates/style.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/style.scss b/templates/style.scss index eda3cde08..773c3fe04 100644 --- a/templates/style.scss +++ b/templates/style.scss @@ -809,9 +809,16 @@ i.dependencies.normal { } // Fix for anchors, so that they are well positioned right below the sticky header -.section-header::before { +// FIXME: This is a hack and should be replaced with a proper solution. +.small-section-header::before, .section-header::before, h3[class="method"]::before { display: block; content: ""; height: 3rem; margin-top: -3rem; } + +// Due to the anchor fix and sub-optimal rustdoc css, the method collapser is mispositioned. +// FIXME: Workaround by applying a top margin. +h3[class="method"] > a[class="collapse-toggle"] { + margin-top: 3rem; +}