[whatwg/dom] Need some kind of specifying target offset? (#473)

Just encounter the fixed header anchor problem yet again, seems like a very common problem

https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header

Isn't it time we introduce some smarter way of telling the browser that we have a fixed header and it needs to compensate anchor link that it shouldn't scroll too much?

I have no idea of how to do it but i got some few ideas in mind

Globally, applies to all anchors
`<meta name="anchor-offset" content="100px">`
`window.anchorOffset = "100px"`

Individually, gives more fin control
`<h1 id="deeplink" offset="100">title</h1>`

css solution
`h1 {anchor-offset: 100px}`

---

sry if i posted this in the wrong repo, don't know where it belongs

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/473

Received on Wednesday, 28 June 2017 12:17:18 UTC