-
Notifications
You must be signed in to change notification settings - Fork 4.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 #3493
base: master
Are you sure you want to change the base?
add task solution #3493
Conversation
AlinaChukh
commented
Aug 18, 2023
•
edited
Loading
edited
- DEMO LINK
- TEST REPORT LINK
src/index.html
Outdated
<div class="stars stars--1"> | ||
<div class="stars__star yellow--color"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
</div> |
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.
src/style.css
Outdated
.main { | ||
width: 96px; | ||
margin: auto; | ||
} |
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.
delete it from the html and css
src/style.css
Outdated
.stars { | ||
display: flex; | ||
justify-content: space-between; | ||
} |
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.
just flex, add indents using margin-right, and don't forget to remove the margin from the last element
.stars { | |
display: flex; | |
justify-content: space-between; | |
} | |
.stars { | |
display: flex; | |
} |
src/style.css
Outdated
.yellow--color { | ||
background: url(../src/images/star-active.svg) no-repeat; | ||
} |
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.
delete
src/style.css
Outdated
.stars__star { | ||
background: url(../src/images/star.svg) no-repeat; | ||
width: 16px; | ||
height: 16px; | ||
} |
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.
add background-position: center;
readme.md
Outdated
@@ -1,7 +1,7 @@ | |||
# Stars block | |||
Replace `<your_account>` with your Github username and copy the links to Pull Request description: | |||
- [DEMO LINK](https://<your_account>.github.io/layout_stars/) | |||
- [TEST REPORT LINK](https://<your_account>.github.io/layout_stars/report/html_report/) | |||
- [DEMO LINK](https://<AlinaChukh>.github.io/layout_stars/) |
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.
- [DEMO LINK](https://<AlinaChukh>.github.io/layout_stars/) | |
- [DEMO LINK](https://AlinaChukh.github.io/layout_stars/) |
readme.md
Outdated
- [DEMO LINK](https://<your_account>.github.io/layout_stars/) | ||
- [TEST REPORT LINK](https://<your_account>.github.io/layout_stars/report/html_report/) | ||
- [DEMO LINK](https://<AlinaChukh>.github.io/layout_stars/) | ||
- [TEST REPORT LINK](https://<AlinaChukh>.github.io/layout_stars/report/html_report/) |
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.
- [TEST REPORT LINK](https://<AlinaChukh>.github.io/layout_stars/report/html_report/) | |
- [TEST REPORT LINK](https://AlinaChukh.github.io/layout_stars/report/html_report/) |
src/style.css
Outdated
display: flex; | ||
margin: 0; | ||
flex-direction: column; | ||
align-items: center; |
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.
delete all styles from body, keep only margin: 0;
src/style.css
Outdated
margin-right: 4px; | ||
} | ||
|
||
.stars--1 > .stars__star:nth-child(-n + 1) { |
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.
.stars--1 > .stars__star:nth-child(-n + 1) { | |
.stars--1 > .stars__star:nth-child(-n + 1), | |
.stars--2 > .stars__star:nth-child(-n + 2), | |
.stars--3 > .stars__star:nth-child(-n + 3), | |
... { | |
} |
src/style.css
Outdated
|
||
.stars--1 > .stars__star:nth-child(-n + 1) { | ||
background: url(../src/images/star-active.svg) no-repeat; | ||
background-position: center; |
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.
you already added this style in .stars__star, delete here
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.
good job, just fix indent
<title>Stars</title> | ||
<link rel="stylesheet" href="./style.css"> | ||
</head> | ||
<body> | ||
<h1>Stars</h1> | ||
|
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.
<div class="stars__star"></div> | ||
<div class="stars__star"></div> | ||
</div> | ||
|
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.