You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 11, 2023. It is now read-only.
* Add ESM module entry point to package
* Move `main` to `module` in package.json
* Generate commonjs output and set to `main`
* Sync package.json and package-lock.json
* Remove dead eslint global
* Remove rollup-plugin-node-resolve
* Output ESM file properly
* Use babel to support IE11
* Ignore dist folder during dev
* * Use `rollup-plugin-serve`
* Consolidate rollup watch and static server into `npm start`
* Update README to use `npm start`
* Add index.html file to support navigating to /examples using static server
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,26 +145,26 @@ The `scrollTo` method allows a set of options which are synonymous with the
145
145
[ScrollToOptions](https://drafts.csswg.org/cssom-view/#dictdef-scrolltooptions) of the CSS specification,
146
146
but some additional ones are provided by this library until supported natively.
147
147
148
-
| Option | Type | Description |
149
-
| ---------- | ------ | -----------|
150
-
|`behavior`| String | The type of [scroll behavior](https://drafts.csswg.org/cssom-view/#enumdef-scrollbehavior) which can be set to `auto` or `smooth`. This is the recommended option since this is already natively supported. **If this is set, all other options are ignored**. |
|`behavior`| String | The type of [scroll behavior](https://drafts.csswg.org/cssom-view/#enumdef-scrollbehavior) which can be set to `auto` or `smooth`. This is the recommended option since this is already natively supported. **If this is set, all other options are ignored**. |
151
151
|`duration`| Number | The number of milliseconds the scroll will take to complete |
152
152
|`easing`| String | The easing to use when scrolling. Only keyword values of the [animation-timing-function](https://drafts.csswg.org/css-animations/#animation-timing-function) are supported. But passing function values will eventually be supported also (ie. `cubic-bezier(0.1, 0.7, 1.0, 0.1)`, `steps(4, end)`, etc) |
|`element`|`HTMLElement`| The element to scroll into the viewport |
159
-
|`scroller`|`HTMLElement`| The element to be scrolled (defaults to `document.body`) |
160
-
|`options`|`ScrollIntoViewOptions`| A set of scroll options to scroll the element into view (see writeup below) (i.e. `{behavior: 'smooth', top: '20', left: '0''}`) |
|`element`|`HTMLElement`| The element to scroll into the viewport|
159
+
|`scroller`|`HTMLElement`| The element to be scrolled (defaults to `document.body`)|
160
+
|`options`|`ScrollIntoViewOptions`| A set of scroll options to scroll the element into view (see writeup below) (i.e. `{behavior: 'smooth', top: '20', left: '0''}`) |
161
161
162
162
#### scrollIntoView Options
163
163
164
164
A set of [ScrollIntoViewOptions](https://drafts.csswg.org/cssom-view/#dictdef-scrollintoviewoptions) can be passed to the `scrollIntoView` method.
|`behavior`| String | The type of [scroll behavior](https://drafts.csswg.org/cssom-view/#enumdef-scrollbehavior) which can be set to `auto` or `smooth`. Defaults to `auto`. |
169
169
170
170
## Examples
@@ -173,7 +173,7 @@ Code samples showing how to use this package can be found in the [examples](exam
173
173
and
174
174
175
175
```bash
176
-
npm run start-server
176
+
npm start
177
177
```
178
178
179
179
Which will make the examples available at http://localhost:9383/examples/.
0 commit comments