-
Notifications
You must be signed in to change notification settings - Fork 4k
add a solution #4219
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 a solution #4219
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -11,12 +11,26 @@ | |
| content="ie=edge" | ||
| /> | ||
| <title>Stop watch</title> | ||
| <link | ||
| rel="stylesheet" | ||
| href="./styles/utills.scss" | ||
| /> | ||
| <link | ||
| rel="stylesheet" | ||
| href="./styles/index.scss" | ||
| /> | ||
| </head> | ||
| <body> | ||
| <h1>Stop watch</h1> | ||
| <main class="main"> | ||
| <div class="stopwatch"> | ||
|
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 an element with the class |
||
| <div class="stopwatch__center"></div> | ||
| <div | ||
| class="stopwatch__arrow-of-sec stopwatch__arrow-of-sec--speed-up" | ||
| ></div> | ||
| <div | ||
| class="stopwatch__arrow-of-min stopwatch__arrow-of-min--speed-up" | ||
|
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 markup currently places modifier classes on the arrow elements: |
||
| ></div> | ||
| </div> | ||
| </main> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,64 @@ | ||
| @import './utills'; | ||
|
|
||
| body { | ||
| margin: 0; | ||
| } | ||
|
|
||
| .main { | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| min-height: 100vh; | ||
| } | ||
|
|
||
| .stopwatch { | ||
| display: flex; | ||
| width: 80vmin; | ||
| height: 80vmin; | ||
| border: 1vmin dotted #000; | ||
| border-radius: 50%; | ||
|
|
||
| justify-content: center; | ||
| align-items: center; | ||
|
|
||
| &__center { | ||
| position: absolute; | ||
| z-index: 3; | ||
| width: 5vmin; | ||
| height: 5vmin; | ||
| border-radius: 50%; | ||
| background-color: #f6a603; | ||
| } | ||
|
|
||
| &__arrow-of-sec { | ||
| position: absolute; | ||
| bottom: 50%; | ||
| z-index: 2; | ||
|
|
||
| width: 1.5vmin; | ||
| height: 38vmin; | ||
| background-color: #2c8000; | ||
|
|
||
| @include arrows-anim(rotate-arrows, 60s, linear); | ||
|
|
||
| &--speed-up { | ||
| @include arrows-anim(rotate-arrows, 10s, linear); | ||
| } | ||
| } | ||
|
|
||
| &__arrow-of-min { | ||
| position: absolute; | ||
| bottom: 50%; | ||
| z-index: 1; | ||
|
|
||
| width: 3vmin; | ||
| height: 20vmin; | ||
| background-color: #0700ff; | ||
|
|
||
| @include arrows-anim(rotate-arrows, 3600s, steps(60)); | ||
|
|
||
| &--speed-up { | ||
| @include arrows-anim(rotate-arrows, 600s, steps(60)); | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| @keyframes rotate-arrows { | ||
| from { | ||
| transform: rotate(0deg); | ||
| } | ||
|
|
||
| to { | ||
| transform: rotate(360deg); | ||
| } | ||
| } | ||
|
|
||
| @mixin arrows-anim($name, $duration, $timing-function) { | ||
| animation-name: $name; | ||
| animation-duration: $duration; | ||
| transform-origin: bottom; | ||
| animation-timing-function: $timing-function; | ||
| animation-iteration-count: infinite; | ||
| } |
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 links two SCSS files which is allowed in this task, but check the filename spelling: you linked
./styles/utills.scsson line 16. The more common spelling isutils.scss. If your actual file is namedutills.scssthen keep it, otherwise rename or correct the href to match your stylesheet filename. A mismatched filename will prevent styles/animations from loading and fail the task.