-
Notifications
You must be signed in to change notification settings - Fork 4k
Develop #4218
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?
Develop #4218
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 |
|---|---|---|
|
|
@@ -17,6 +17,10 @@ | |
| /> | ||
| </head> | ||
| <body> | ||
| <h1>Stop watch</h1> | ||
| <div class="stopwatch stopwatch--speed-up"> | ||
| <div class="stopwatch__hand stopwatch__hand--minute"></div> | ||
| <div class="stopwatch__hand stopwatch__hand--second"></div> | ||
|
Comment on lines
+21
to
+22
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. You need to define |
||
| <div class="stopwatch__center"></div> | ||
|
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. The center element |
||
| </div> | ||
|
Comment on lines
+20
to
+24
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. The HTML includes the required
Comment on lines
+20
to
+24
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. Implement the |
||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| @keyframes rotate { | ||
|
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. The task requires keyframes implemented using from/to + transform with rotate property (checklist item). Your keyframes use percentage syntax (0%/100%) instead of from/to. Also the keyframes include translateX which mixes positioning with rotation — the requirement expects rotate in transform for the keyframes. Please replace the @Keyframes with from/to and ensure transform contains rotate only (e.g. from { transform: rotate(0deg); } to { transform: rotate(360deg); }). 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. Only the animations.scss file is provided but it doesn't satisfy the 'from/to' keyframes constraint and it's insufficient alone. Ensure you add/adjust CSS rules for |
||
| from { | ||
| transform: rotate(0deg); | ||
| } | ||
| to { | ||
| transform: rotate(360deg); | ||
|
Comment on lines
+1
to
+6
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. The keyframes in animations.scss are correctly written using
Comment on lines
+1
to
+6
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. Make sure the seconds hand animation uses a linear timing function and duration |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,11 @@ | ||
| @import './variables'; | ||
| @import './animations'; | ||
| @import './stopwatch'; | ||
|
|
||
| body { | ||
| margin: 0; | ||
| min-height: 100vh; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| .stopwatch { | ||
| position: relative; | ||
| width: 80vmin; | ||
| height: 80vmin; | ||
| border: 1vmin dotted $border-color; | ||
| border-radius: 50%; | ||
|
|
||
| &__center { | ||
| position: absolute; | ||
| top: 50%; | ||
| left: 50%; | ||
| transform: translate(-50%, -50%); | ||
| width: 5vmin; | ||
| height: 5vmin; | ||
| background-color: $center-color; | ||
| border-radius: 50%; | ||
| z-index: 10; | ||
| } | ||
|
|
||
| &__hand { | ||
| position: absolute; | ||
| bottom: 50%; | ||
| left: 50%; | ||
| transform-origin: 50% 100%; | ||
| transform: translateX(-50%) rotate(0deg); | ||
|
|
||
| &--minute { | ||
| width: 3vmin; | ||
| height: 20vmin; | ||
| background-color: $minute-hand-color; | ||
| margin-left: -1.5vmin; | ||
| animation: rotate 60s steps(60) infinite; | ||
| } | ||
|
|
||
| &--second { | ||
| width: 1.5vmin; | ||
| height: 38vmin; | ||
| background-color: $second-hand-color; | ||
| margin-left: -0.75vmin; | ||
| animation: rotate 60s linear infinite; | ||
| } | ||
| } | ||
|
|
||
| &--speed-up { | ||
| .stopwatch__hand { | ||
| &--minute { | ||
| animation-duration: 600s; | ||
| } | ||
|
|
||
| &--second { | ||
| animation-duration: 10s; | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| $border-color: #000; | ||
| $center-color: #f6a603; | ||
| $minute-hand-color: #0700ff; | ||
| $second-hand-color: #2c8000; |
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.
The HTML includes the required element with class
stopwatchand thestopwatch--speed-upmodifier which tests expect. However, many visual and animation requirements are missing because corresponding CSS/SCSS is not provided. Implement styles for: center the stopwatch (vertically and horizontally); set its size to 80vmin by 80vmin; add a 1vmin dotted round border with color #000; create minute and second hands with the exact lengths, widths and colors (minute: 20vmin length and 3vmin width, color #0700ff; second: 38vmin length and 1.5vmin width, color #2c8000); ensure the starting position of hands is at the top; add the center circle of diameter 5vmin and color #f6a603; animate infinitely; seconds hand must use a linear animation of 60s per full circle; minutes hand must use steps(60) over 60min; create rules for thestopwatch--speed-upmodifier to change durations to 10s and 10min. Without these styles the task requirements are not met.