-
Notifications
You must be signed in to change notification settings - Fork 4k
add task solution #4176
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
base: master
Are you sure you want to change the base?
add task solution #4176
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [20.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: npm install | ||
| - run: npm test | ||
| - name: Upload HTML report(backstop data) | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: report | ||
| path: backstop_data |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,83 @@ | ||
| @function toseconds($min) { | ||
| @return $min * 60s; | ||
| } | ||
|
|
||
| @mixin flex-center { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| @mixin time-animation($name, $duration, $ease, $count) { | ||
| animation-name: $name; | ||
| animation-duration: $duration; | ||
| animation-timing-function: $ease; | ||
| animation-iteration-count: $count; | ||
| } | ||
|
|
||
| @keyframes rotation { | ||
| from { | ||
| transform: rotate(0deg); | ||
| } | ||
| to { | ||
| transform: rotate(360deg); | ||
| } | ||
| } | ||
|
|
||
| body { | ||
| @include flex-center; | ||
|
|
||
| margin: 0; | ||
| min-height: 100vh; | ||
| } | ||
|
|
||
| .stopwatch { | ||
| @include flex-center; | ||
|
|
||
| width: 80vmin; | ||
| aspect-ratio: 1; | ||
| border: 1vmin dotted #000; | ||
| border-radius: 50%; | ||
|
|
||
| &__center { | ||
| position: relative; | ||
| width: 5vmin; | ||
| aspect-ratio: 1; | ||
| border-radius: 50%; | ||
| background-color: #f6a603; | ||
| } | ||
|
|
||
| &__minutes { | ||
| @include time-animation(rotation, toseconds(60), steps(60), infinite); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This violates the MEDIUM requirement from the task description: the minutes-hand animation duration should be expressed as |
||
|
|
||
| position: absolute; | ||
| z-index: -2; | ||
| bottom: 50%; | ||
| height: 20vmin; | ||
| width: 3vmin; | ||
| background-color: #0700ff; | ||
| transform-origin: 50% 100%; | ||
| } | ||
|
|
||
| &__seconds { | ||
| @include time-animation(rotation, 60s, linear, infinite); | ||
|
|
||
| position: absolute; | ||
| z-index: -1; | ||
| bottom: 50%; | ||
| height: 38vmin; | ||
| width: 1.5vmin; | ||
| background-color: #2c8000; | ||
| transform-origin: 50% 100%; | ||
| } | ||
|
|
||
| &--speed-up { | ||
| .stopwatch__minutes { | ||
| animation-duration: toseconds(10); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This violates the MEDIUM requirement from the task description: the |
||
| } | ||
|
|
||
| .stopwatch__seconds { | ||
| animation-duration: 10s; | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #1:
Keyframes implemented using from/to + transform with rotate property, because you are usingtransform: rotateZ(0deg);instead oftransform: rotate(0deg);. You should switch torotate(...)to match the exact requirement.