From 2fc297f3e1f6671a55de8f79689da498fb17ce18 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 7 Sep 2022 21:33:45 +0100 Subject: [PATCH] [Beta] Fix scroll margin --- beta/src/styles/index.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/beta/src/styles/index.css b/beta/src/styles/index.css index 2df7ab77..1a9bbc92 100644 --- a/beta/src/styles/index.css +++ b/beta/src/styles/index.css @@ -214,10 +214,17 @@ html.dark .code-step * { } .mdx-heading { - scroll-margin-top: 2.5em; + scroll-margin-top: 3em; /* Space for the anchor */ padding-right: 1em; } + +@media (min-width: 1024px) { + .mdx-heading { + scroll-margin-top: 1em; + } +} + .mdx-heading:before { height: 6rem; margin-top: -6rem;