Scrolling to anchor with a fixed header now results in scrolling too far. It would be great if I could set a certain margin to prevent this from happening.
If your function would provide support for this, my problem would be solved. I already have a CSS variable for the height of the header and I could add it to the HTML or to any section.
I am pretty sure there is no JS involved so nothing gets overwritten.
As your link isn’t working for me, I am not sure what you are on about in detail.
I expect it’s something like the scroll-padding-top property.
I just tested the behaviour with implementing this property and had no issues.
Everything is working as expected.
Do you have a live site where you can show your issue?