From 75e2cac488fe4e3de0d5c6fed049a3f52e662d6a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 23 Feb 2022 08:08:52 -0800 Subject: [PATCH] Fix #33993 by removing scroll-padding-top for some :target trickery --- site/assets/scss/_content.scss | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/site/assets/scss/_content.scss b/site/assets/scss/_content.scss index 20237f0470ed..6c193d72850a 100644 --- a/site/assets/scss/_content.scss +++ b/site/assets/scss/_content.scss @@ -2,12 +2,13 @@ // Bootstrap docs content theming // -// Offset for the sticky header -:root { - scroll-padding-top: 5rem; -} - .bd-content { + // Offset content from fixed navbar when jumping to headings + > :target { + padding-top: 5rem; + margin-top: -5rem; + } + > h2:not(:first-child) { margin-top: 3rem; }