[cssom-view] scrollIntoView() with block/inline offset

I searched the archives but couldn't find any discussion about this:

Sometimes I feel the need to scroll an element into the view with some
offset so that it's not completely aligned with it's container, and
visually in a more appropriate place. Because of this, I abandon using
scrollIntoView() and use scrollBy()/scrollTo() with the element's bounding
client rect plus/minus that offset. What would you think about adding two
new options to ScrollIntoViewOptions such as blockOffset and inlineOffset
which will be the distance between the element and its container after the
element is scrolled into view?

-- 
merih

Received on Monday, 25 January 2016 18:01:57 UTC