[csswg-drafts] [css-scroll-anchoring] take into account the targets scroll-margin value

jonjohnjohnson has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-scroll-anchoring] take into account the targets scroll-margin value ==
https://drafts.csswg.org/css-scroll-anchoring-1/#anchor-node-selection

It's quite keen to use the snapport (`scroll-padding` values) for jump linking inside of a scrollport, even when scroll-snapping isn't enabled, but I've often needed multiple dimensions of offsetting my jump links from the edge of the scrollport.

Usually with something like...
```css
.target-for-referrence {
  position: relative;
  top: -3rem;
}
.target-for-section-title {
  position: relative;
  top: -6rem;
}
```
I currently see no mention of `scroll-margin` in [scroll-anchoring](https://drafts.csswg.org/css-scroll-anchoring-1) or scroll-anchoring in relation to `scroll-margin` in [scroll-snap](https://drafts.csswg.org/css-scroll-snap-1/#scroll-margin). And I have a feeling without adding an elements `scroll-margin` value into a scroll position decision, we'll still be left having to use the types of hacks outlined in the following link.

[Jump links and viewport positioning](http://nicolasgallagher.com/jump-links-and-viewport-positioning/demo/).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2428 using your GitHub account

Received on Friday, 9 March 2018 16:01:55 UTC