Skip to content

Commit d00becb

Browse files
renovate[bot]renovate-botstipsan
committed
fix: 'instant' isn't in the spec (#645)
* chore(deps): update dependency typescript to v3.7.4 * fix: 'instant' isn't in the spec * fix: 'instant' isn't in the spec Co-authored-by: Renovate Bot <renovatebot@gmail.com> Co-authored-by: Cody Olsen <stipsan@gmail.com>
1 parent 9c544b8 commit d00becb

File tree

4 files changed

+4
-15
lines changed

4 files changed

+4
-15
lines changed

README.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Type: `Object`
124124

125125
#### behavior
126126

127-
Type: `'auto' | 'smooth' | 'instant' | Function`<br> Default: `'auto'`
127+
Type: `'auto' | 'smooth' | Function`<br> Default: `'auto'`
128128

129129
> Introduced in `v2.1.0`
130130
@@ -154,16 +154,10 @@ html,
154154
}
155155
```
156156

157-
Quick note, in the CSS property the `auto` keyword equals `behavior: 'instant'`, not `behavior: 'auto'` on `scrollIntoView`. **Yes**, this is confusing.
158-
159157
##### `'smooth'`
160158

161159
Using `behavior: 'smooth'` is the easiest way to smooth scroll an element as it does not require any CSS, just a browser that implements it. [More information.](#ponyfill-smooth-scrolling)
162160

163-
##### `'instant'`
164-
165-
This is useful for scenarios where it's certain that smooth scrolling would make an interaction feel sluggish. Like keyboard navigation and other user experiences where the end user expect things to move _instantly_.
166-
167161
##### `Function`
168162

169163
When given a function then this library will only calculate what should be scrolled and leave it up to you to perform the actual scrolling.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"semantic-release": "15.14.0",
6464
"tslint": "5.20.1",
6565
"tslint-config-prettier": "1.18.0",
66-
"typescript": "3.1.6"
66+
"typescript": "3.7.4"
6767
},
6868
"keywords": [
6969
"behavior-smooth",

src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Standard, based on CSSOM View spec
2-
export type ScrollBehavior = 'auto' | 'instant' | 'smooth'
2+
export type ScrollBehavior = 'auto' | 'smooth'
33
export type ScrollLogicalPosition = 'start' | 'center' | 'end' | 'nearest'
44
// This new option is tracked in this PR, which is the most likely candidate at the time: https://github.com/w3c/csswg-drafts/pull/1805
55
export type ScrollMode = 'always' | 'if-needed'

yarn.lock

+1-6
Original file line numberDiff line numberDiff line change
@@ -7608,12 +7608,7 @@ typescript-compiler@^1.4.1-2:
76087608
resolved "https://registry.yarnpkg.com/typescript-compiler/-/typescript-compiler-1.4.1-2.tgz#ba4f7db22d91534a1929d90009dce161eb72fd3f"
76097609
integrity sha1-uk99si2RU0oZKdkACdzhYety/T8=
76107610

7611-
typescript@3.1.6:
7612-
version "3.1.6"
7613-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68"
7614-
integrity sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==
7615-
7616-
typescript@^3.4:
7611+
typescript@3.7.4, typescript@^3.4:
76177612
version "3.7.4"
76187613
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.4.tgz#1743a5ec5fef6a1fa9f3e4708e33c81c73876c19"
76197614
integrity sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==

0 commit comments

Comments
 (0)