Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This is possible because [we use the Parcel library](https://en.parceljs.org/scs
## Checklist

❗️ Replace `<your_account>` with your GitHub username and copy the links to the `Pull Request` description:
- [DEMO LINK](https://<your_account>.github.io/layout_stop-watch/)
- [DEMO LINK](https://eugenia-andropova.github.io/layout_stop-watch/)

❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.

Expand Down
6 changes: 5 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
/>
</head>
<body>
<h1>Stop watch</h1>
<div class="stopwatch stopwatch--sped-up">

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 be stopwatch--speed-up.

<div class="stopwatch__second-hand"></div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class name for the second hand should be stopwatch__seconds-hand to match the task requirements.

<div class="stopwatch__minutes-hand"></div>
<div class="stopwatch__center"></div>
</div>
</body>
</html>
67 changes: 66 additions & 1 deletion src/styles/index.scss
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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class name for the second hand should be &__seconds-hand to match the task requirements.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BEM modifier &--speed-up is correctly named here, but it should not be nested within the elements. According to the task requirements, the modifier should be applied directly to the stopwatch block.

Loading