Skip to content

Commit 0d54577

Browse files
committed
update docs to mention pixels
1 parent e0bba8e commit 0d54577

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/modifiers/scroll-into-view.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ You should use this modifier whenever you need to have an element scrolled into
2727

2828
### Usage with offset
2929

30-
When passing in an offset, it will call [scrollTo](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo), and the `options` parameter is designed to correspond to its `options`. The `options.behavior` operates the same, however, instead of `top` and `left` there are `topOffset` and `leftOffset`, respectively. If an offset value is not set then the value passed to `scrollTo` is 0, e.g. `options = { topOffset: 10 }` results in `element.scrollTo({ top: [computedValue], left: 0 })`. Experiment with the below example, you may need to zoom and resize the window to see a horizontal scrollbar.
30+
When passing in an offset, it will call [scrollTo](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo), and the `options` parameter is designed to correspond to its `options`. The `options.behavior` operates the same, however, instead of `top` and `left` there are `topOffset` and `leftOffset`, respectively. As with `top` and `left`, `topOffset` and `leftOffset` are in pixels. If an offset value is not set then the value passed to `scrollTo` is 0, e.g. `options = { topOffset: 10 }` results in `element.scrollTo({ top: [computedValue], left: 0 })`. Experiment with the below example, you may need to zoom and resize the window to see a horizontal scrollbar.
3131

3232

3333
```handlebars

0 commit comments

Comments
 (0)