-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
add task solution #3591
base: master
Are you sure you want to change the base?
add task solution #3591
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--sped-up"> | ||
<div class="stopwatch__second-hand"></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 class name for the second hand should be |
||
<div class="stopwatch__minutes-hand"></div> | ||
<div class="stopwatch__center"></div> | ||
</div> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,68 @@ | ||
body { | ||
body, | ||
html { | ||
margin: 0; | ||
padding: 0; | ||
height: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
@keyframes rotate { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
.stopwatch { | ||
width: 80vmin; | ||
height: 80vmin; | ||
border: 1vmin dotted #000; | ||
border-radius: 50%; | ||
position: relative; | ||
|
||
&__minutes-hand { | ||
height: 20vmin; | ||
width: 3vmin; | ||
background-color: #0700ff; | ||
position: absolute; | ||
top: 20vmin; | ||
left: calc(50% - 1.5vmin); | ||
transform-origin: 50% 100%; | ||
animation: rotate 600s steps(60) infinite; | ||
} | ||
|
||
&__second-hand { | ||
height: 38vmin; | ||
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 class name for the second hand should be |
||
width: 1.5vmin; | ||
background-color: #2c8000; | ||
position: absolute; | ||
top: 2vmin; | ||
left: calc(50% - (1.5vmin / 2)); | ||
transform-origin: 50% 100%; | ||
animation: rotate 10s linear infinite; | ||
} | ||
|
||
&__center { | ||
height: 5vmin; | ||
width: 5vmin; | ||
background-color: #f6a603; | ||
border-radius: 50%; | ||
position: absolute; | ||
top: calc(50% - 2.5vmin); | ||
left: calc(50% - 2.5vmin); | ||
} | ||
|
||
&--speed-up { | ||
&__minutes-hand { | ||
animation-duration: 600s / 6; | ||
} | ||
|
||
&__second-hand { | ||
animation-duration: 10s / 6; | ||
} | ||
} | ||
} | ||
Comment on lines
+59
to
+67
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 BEM modifier |
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 BEM modifier
stopwatch--sped-up
is incorrectly named. According to the task requirements, it should bestopwatch--speed-up
.