-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add view-transitions mpa-example-2 with slide animations #334
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
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
905939c
Add view-transitions mpa-example-2 with slide animations
yashrajbharti c8f74e1
Update view-transitions/mpa-example-2/index.html
yashrajbharti d0a803b
Update view-transitions/mpa-example-2/index.html
yashrajbharti 4801df2
Update view-transitions/mpa-example-2/page2.html
yashrajbharti e39c93c
file rename and animations keyframe in kebab case
yashrajbharti 561b603
Format using Prettier
pepelsbey 9e8a8ee
Update view-transitions/mpa-example-2/style.css
yashrajbharti 0608bba
Update view-transitions/mpa-example-2/index.html
yashrajbharti a9cde7e
Update view-transitions/mpa-example-2/about.html
yashrajbharti c28d761
Update view-transitions/mpa-example-2/about.html
yashrajbharti 641b729
Update view-transitions/mpa-example-2/about.html
yashrajbharti 1084bb9
Update view-transitions/mpa-example-2/index.html
yashrajbharti 32035f3
Rename files in mpa-example-2: about.html → hobbies.html, page1.css →…
yashrajbharti 74f3092
Update view-transitions/mpa-example-2/hobbies.html
yashrajbharti 1b9dc00
Update view-transitions/mpa-example-2/index.html
yashrajbharti eb96586
Update view-transitions/mpa-example-2/hobbies.html
yashrajbharti e84c939
Update view-transitions/mpa-example-2/index.html
yashrajbharti 89471b8
Update view-transitions/mpa-example-2/hobbies.html
yashrajbharti 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| @view-transition { | ||
| navigation: auto; | ||
| } | ||
|
|
||
| @keyframes slide-from-right { | ||
| from { | ||
| transform: translateX(100vw); | ||
| } | ||
|
|
||
| to { | ||
| transform: translateX(0); | ||
| } | ||
| } | ||
|
|
||
| ::view-transition-old(root), | ||
| ::view-transition-new(root) { | ||
| mix-blend-mode: normal; | ||
| } | ||
|
|
||
| ::view-transition-old(root) { | ||
| animation: none; | ||
| } | ||
|
|
||
| ::view-transition-new(root) { | ||
| animation: slide-from-right 0.3s; | ||
| } |
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,23 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <title>Cross-document view transition example 2: Page 2</title> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| <link rel="stylesheet" href="hobbies.css" /> | ||
| </head> | ||
| <body class="hobbies"> | ||
| <section> | ||
| <h1>🧶 My Hobbies</h1> | ||
| <p> | ||
| When I'm not busy napping, I love to play with yarn and chase laser | ||
| pointers. I'm also an avid bird watcher. | ||
| </p> | ||
| <p> | ||
| Thank you for your interest! | ||
| You can return to the <a href="index.html">homepage</a> now. | ||
| </p> | ||
| </section> | ||
| </body> | ||
| </html> |
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,28 @@ | ||
| @view-transition { | ||
| navigation: auto; | ||
| } | ||
|
|
||
| @keyframes slide-to-right { | ||
| from { | ||
| transform: translateX(0); | ||
| z-index: 2; | ||
| } | ||
|
|
||
| to { | ||
| transform: translateX(100vw); | ||
| z-index: 2; | ||
| } | ||
| } | ||
|
|
||
| ::view-transition-old(root), | ||
| ::view-transition-new(root) { | ||
| mix-blend-mode: normal; | ||
| } | ||
|
|
||
| ::view-transition-old(root) { | ||
| animation: slide-to-right 0.3s; | ||
| } | ||
|
|
||
| ::view-transition-new(root) { | ||
| animation: none; | ||
| } |
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,26 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <title>Cross-document view transition example 2: Page 1</title> | ||
| <link rel="stylesheet" href="index.css" /> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| </head> | ||
| <body class="index"> | ||
| <section> | ||
| <h1>🏡 Homepage</h1> | ||
| <p> | ||
| Hello, my name is Mrs. Whiskers. Welcome to my personal website! | ||
| </p> | ||
| <p> | ||
| <div> | ||
| Everyone needs a place on the web, even a cat. | ||
| </div> | ||
| <div> | ||
| If you're curious, you can find out more about my <a href="hobbies.html">hobbies</a>. | ||
| </div> | ||
| </p> | ||
| </section> | ||
| </body> | ||
| </html> |
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,26 @@ | ||
| *, | ||
| *:before, | ||
| *:after { | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| font-family: system-ui; | ||
| max-inline-size: 400px; | ||
| padding: 20px; | ||
| text-align: center; | ||
| margin: auto; | ||
| line-height: 1.5; | ||
|
|
||
| &.index { | ||
| background-color: oklch(0.9529 0.0444 332); | ||
| } | ||
|
|
||
| &.hobbies { | ||
| background-color: oklch(0.9588 0.0617 184.24); | ||
| } | ||
| } | ||
|
|
||
| a { | ||
| color: oklch(0.0867 0.0419 261.53); | ||
| } | ||
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.