-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix sliding animation on table elements in Safari #5922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
chrisirhc
wants to merge
9
commits into
sveltejs:svelte-4
from
chrisirhc:fix-slide-animation-static-css
Closed
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e4ea648
Fix sliding animation on table elements and in Safari
chrisirhc f7daf11
stylistic changes to variable name and clean up comment
chrisirhc f7e4d0d
add test
chrisirhc 153a116
test cleanup
chrisirhc 5baf255
Merge branch 'master' into fix-slide-animation-static-css
benmccann b7160b9
update variable to follow naming convention
benmccann 5814e2a
rebase
benmccann fc5bde2
add back accidentally deleted line
benmccann f343c78
Update src/runtime/internal/style_manager.ts
benmccann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
test/runtime/samples/transition-css-in-out-in-with-static/_config.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| export default { | ||
| test({ assert, component, target, window, raf }) { | ||
| component.visible = true; | ||
| const div = target.querySelector('div'); | ||
|
|
||
| assert.equal(div.className, '__svelte_2375698960'); | ||
| assert.equal(div.style.animation, '__svelte_3809512021_0 100ms linear 0ms 1 both'); | ||
|
|
||
| raf.tick(50); | ||
| component.visible = false; | ||
|
|
||
| // both in and out styles | ||
| assert.equal(div.className, '__svelte_2375698960 __svelte_1786671888'); | ||
| assert.equal(div.style.animation, '__svelte_3809512021_0 100ms linear 0ms 1 both, __svelte_3750847757_0 100ms linear 0ms 1 both'); | ||
|
|
||
| raf.tick(75); | ||
| component.visible = true; | ||
|
|
||
| // reset to in styles (in transition in progress) | ||
| assert.equal(div.style.animation, '__svelte_3809512021_1 100ms linear 0ms 1 both'); | ||
| assert.equal(div.className, '__svelte_2375698960'); | ||
|
|
||
| // 100ms after in transition started at 75 | ||
| raf.tick(175); | ||
|
|
||
| // reset original styles after in transition is complete | ||
| assert.equal(div.style.animation, ''); | ||
| assert.equal(div.className, ''); | ||
| } | ||
| }; |
27 changes: 27 additions & 0 deletions
27
test/runtime/samples/transition-css-in-out-in-with-static/main.svelte
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <script> | ||
| export let visible; | ||
|
|
||
| function foo() { | ||
| return { | ||
| duration: 100, | ||
| static_css: 'display: block', | ||
| css: t => { | ||
| return `opacity: ${t}`; | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| function bar() { | ||
| return { | ||
| duration: 100, | ||
| static_css: 'display: inline-block', | ||
| css: t => { | ||
| return `opacity: ${t}`; | ||
| } | ||
| }; | ||
| } | ||
| </script> | ||
|
|
||
| {#if visible} | ||
| <div in:foo out:bar></div> | ||
| {/if} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.