-
Notifications
You must be signed in to change notification settings - Fork 4k
add solution #4172
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 solution #4172
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 |
|---|---|---|
| @@ -1,3 +1,70 @@ | ||
| @import './variables'; | ||
|
|
||
| @keyframes rotate-full { | ||
| from { | ||
| transform: rotate(0deg); | ||
| } | ||
|
|
||
| to { | ||
| transform: rotate(360deg); | ||
| } | ||
| } | ||
|
|
||
| body { | ||
| margin: 0; | ||
| height: 100vh; | ||
| width: 100vw; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .stopwatch { | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| height: $watch-size; | ||
| width: $watch-size; | ||
| border-style: dotted; | ||
| border-width: $dot-size; | ||
| border-radius: 50%; | ||
| border-color: $dot-color; | ||
| position: relative; | ||
|
|
||
| &--speed-up { | ||
| --minute-duration: 10s; | ||
| } | ||
|
|
||
| &__center { | ||
| position: absolute; | ||
| height: $center-diametr; | ||
| width: $center-diametr; | ||
| background-color: $center-color; | ||
| border-radius: 50%; | ||
| z-index: 1; | ||
| top: 50%; | ||
| left: 50%; | ||
| transform: translate(-50%, -50%); | ||
| } | ||
|
Comment on lines
+38
to
+48
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 has |
||
|
|
||
| &__minutes-hand, | ||
| &__seconds-hand { | ||
| position: absolute; | ||
| bottom: 50%; | ||
| transform-origin: bottom; | ||
| } | ||
|
|
||
| &__minutes-hand { | ||
| height: $minutes-length; | ||
| width: $minutes-width; | ||
| background-color: $minutes-color; | ||
| animation: rotate-full calc(var(--minute-duration) * 60) steps(60) infinite; | ||
| } | ||
|
|
||
| &__seconds-hand { | ||
| height: $seconds-length; | ||
| width: $seconds-width; | ||
| background-color: $seconds-color; | ||
| animation: rotate-full var(--minute-duration) linear infinite; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| $watch-size: 80vmin; | ||
| $dot-size: 1vmin; | ||
| $dot-color: #000; | ||
| $minutes-length: 20vmin; | ||
| $minutes-width: 3vmin; | ||
| $minutes-color: #0700ff; | ||
| $seconds-length: 38vmin; | ||
| $seconds-width: 1.5vmin; | ||
| $seconds-color: #2c8000; | ||
| $center-diametr: 5vmin; | ||
| $center-color: #f6a603; | ||
|
|
||
| :root { | ||
| --minute-duration: 60s; | ||
|
Comment on lines
+13
to
+14
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. To fully meet the |
||
| } | ||
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 stopwatch border is missing an explicit
border-color: #000;, which is required in the task description (“it should have a 1vmin dotted round border with #000 color”). Please add the color to satisfy this requirement.