ursi/elm-scroll - version: 1.0.0

for more information visit the package's GitHub page

Package contains the following modules:

elm-scroll

elm-scroll lets you easily accomplish the not-so-trivial task of scrolling an element to a specific spot in a viewport, be it the main window or inside another element. The scrolling is instant. However, for browsers that support it, you can get a smooth scroll with the scroll-behavior CSS property.

Positioning

elm-scroll uses a relative system to specify where an element should be positioned on the screen after the scroll has taken place.

Positioning uses two numbers between 0 and 1.

When in a vertical context, 0 represents the top and 1 represents the bottom.

When in a horizontal context, 0 represents the left and 1 represents the right.

To position an inner element relative to an outer element, a position number is specified for each. The inner element is positioned such that the two places specified by the positioning numbers line up.

For example (outer inner): - 0 0: top/left align - 0.5 0.5: center - 1 1: bottom/right align - 0.25 0: top/left of the inner element is 25% of the way down/right the outer element

Limitations