W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2018

[csswg-drafts] Add margin to ScrollIntoViewOptions

From: davidbukacek via GitHub <sysbot+gh@w3.org>
Date: Fri, 01 Jun 2018 11:30:42 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-328483506-1527852642-sysbot+gh@w3.org>
davidbukacek has just created a new issue for https://github.com/w3c/csswg-drafts:

==  Add margin to ScrollIntoViewOptions ==
Alignment to the edge of the element may not always be fully desirable. Therefore, it would be good if we could affect the position by specific margin.

Margin would work on a similar principle as rootMargin of the IntersectionObserver method (https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin)

Possible use
<pre>
element.scrollIntoView({block: 'end', inline: 'end' margin: '0 10px 0 10px'});
element.scrollIntoView({block: 'start', inline: 'start', margin: '50% 0 50%'});
</pre>

Specification: https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2730 using your GitHub account
Received on Friday, 1 June 2018 11:30:46 UTC

This archive was generated by hypermail 2.3.1 : Friday, 1 June 2018 11:30:46 UTC