/

Scroll-margin-top

https://mobile.twitter.com/JoshWComeau/status/1332015868725891076
css

You know that annoying thing when you're scrolled to an anchor and the site's sticky header covers it up?

css
.heading {
scroll-margin-top: 72px;
}

Browser support: Works natively in Chrome, FF, Edge, Opera. Supported in Safari, but with a non-standard property, scroll-snap-margin-top.

Edit this page
Want to make your own site like this?
Try gatsby-theme-code-notes by Zander Martineau.
Notes on code. My second brain, by Zander Martineau.