-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into getAnimations
- Loading branch information
Showing
50 changed files
with
3,207 additions
and
1,507 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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,75 @@ | ||
name: Build and test | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
|
||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
# Default to bash | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
- name: Install Node.js dependencies | ||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" | ||
- name: Build with microbundle | ||
run: "npm run build" | ||
- name: Checkout WPT | ||
run: "npm run test-setup" | ||
- name: WPT hosts | ||
run: "./test/wpt/wpt make-hosts-file | sudo tee -a /etc/hosts" | ||
- name: WPT tests | ||
run: "npm run test:wpt" | ||
- name: Expected results | ||
run: "npm run test:compare" | ||
- name: Clean build files | ||
run: "rm -rf node_modules test/wpt" | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: . | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: github.event_name == 'push' | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains 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 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 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,14 @@ | ||
@echo off | ||
rem Configure command environment variables. | ||
rem config silent [runs silently] | ||
rem config [runs "verbosely", reporting on current settings] | ||
rem Note that anything will match "silent" | ||
if "%WPT_DIR%"=="" set WPT_DIR=test\wpt | ||
if "%WPT_SERVER_PORT%"=="" set WPT_SERVER_PORT=8082 | ||
if "%WPT_SERVER_ADDRESS%"=="" set WPT_SERVER_ADDRESS=127.0.0.1 | ||
if "%LOCAL_BROWSER%"=="" set LOCAL_BROWSER=chrome | ||
if "%LOCAL_WEBDRIVER_BIN%"=="" set LOCAL_WEBDRIVER_BIN=c:\src\src\out\default\chromedriver.exe | ||
if NOT "%1"=="" goto END | ||
echo Configured to run tests on %LOCAL_BROWSER% at http://%WPT_SERVER_ADDRESS%:%WPT_SERVER_PORT% | ||
echo Tests will be served from %WPT_DIR% using %LOCAL_WEBDRIVER_BIN% | ||
:END |
52 changes: 52 additions & 0 deletions
52
demo/basic/anonymous-scroll-timeline-animation-shorthand.html
This file contains 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,52 @@ | ||
<!DOCTYPE HTML> | ||
<title>Anonymous Scroll Progress Timeline</title> | ||
|
||
<style> | ||
@keyframes move { | ||
to { transform: translateX(350px) translateY(2000px); } | ||
} | ||
|
||
@keyframes colorChange { | ||
from { background: red; } | ||
to { background: blue; } | ||
} | ||
|
||
@keyframes widthChange { | ||
from { width: 100px; } | ||
to { width: 120px; } | ||
} | ||
|
||
#box_one { | ||
width: 100px; | ||
height: 100px; | ||
background-color: green; | ||
animation: linear colorChange both, linear widthChange both, move linear; | ||
animation-timeline: scroll(root), auto, scroll(nearest y); | ||
} | ||
|
||
.spacer { | ||
width: 100%; | ||
height: 2000px; | ||
} | ||
|
||
#container { | ||
width: 500px; | ||
height: 500px; | ||
background-color:beige; | ||
overflow: auto; | ||
} | ||
|
||
body { | ||
height: 1000px; | ||
} | ||
</style> | ||
|
||
<body> | ||
|
||
<div id="container"> | ||
<div id="box_one"></div> | ||
<div class="spacer"></div> | ||
</div> | ||
|
||
<script src="../../dist/scroll-timeline.js"></script> | ||
</body> |
This file contains 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,42 @@ | ||
<!DOCTYPE HTML> | ||
<title>Anonymous Scroll Progress Timeline</title> | ||
|
||
<style> | ||
@keyframes move { | ||
to { transform: translateX(350px) translateY(2000px); } | ||
} | ||
|
||
#box_one { | ||
width: 100px; | ||
height: 100px; | ||
background-color: green; | ||
animation: move linear; | ||
animation-timeline: scroll(y nearest); | ||
} | ||
|
||
.spacer { | ||
width: 100%; | ||
height: 2000px; | ||
} | ||
|
||
#container { | ||
width: 500px; | ||
height: 500px; | ||
background-color:beige; | ||
overflow: auto; | ||
} | ||
|
||
body { | ||
height: 3000px; | ||
} | ||
</style> | ||
|
||
<body> | ||
|
||
<div id="container"> | ||
<div id="box_one"></div> | ||
<div class="spacer"></div> | ||
</div> | ||
|
||
<script src="../../dist/scroll-timeline.js"></script> | ||
</body> |
This file contains 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 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 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
Oops, something went wrong.