- Issue created by @mably
- Merge request !38Issue #3520086 by mably: Allow usage of a CSS variable for the scroll offset setting → (Merged) created by mably
- 🇫🇷France mably
You can now define such a scroll offset setting:
var(--toc-scroll-offset, 1.4rem)
And then tweak the
--toc-scroll-offset
using media queries in your CSS files, as can ben seen in the example below::root { --toc-scroll-offset: 8.2rem; } @media (min-width: 992px) { :root { --toc-scroll-offset: 5.4rem; } } @media (min-width: 1200px) { :root { --toc-scroll-offset: 1.4rem; } }