-
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 #3384
base: master
Are you sure you want to change the base?
add task solution #3384
Conversation
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.
UI looks fine 👍🏽 , but code need few more improvements 🛠️ 👨🏽💻
src/style.css
Outdated
.stars--3 .stars_star:nth-child(-n + 3), | ||
.stars--4 .stars_star:nth-child(-n + 4), | ||
.stars--5 .stars_star:nth-child(-n + 5) { | ||
background-image: url(images\star-active.svg); |
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 file path in CSS should use forward slashes, not backslashes. Replace 'images\star-active.svg' with 'images/star-active.svg'.
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
.stars_star { | ||
width: 16px; | ||
height: 16px; | ||
background-image: url(images\star.svg); |
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 file path in CSS should use forward slashes, not backslashes. Replace 'images\star.svg' with 'images/star.svg'.
src/index.html
Outdated
@@ -8,6 +8,54 @@ | |||
<link rel="stylesheet" href="./style.css"> | |||
</head> | |||
<body> | |||
<h1>Stars</h1> | |||
<main class="main"> | |||
<div class="stars stars--0"> |
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.
These HTML elements, following semantic tags should be rather instead of divs
:
<ul>
<li></li>
<li></li>
...
</ul>
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.
Done.
One question. Why PR #3381 is done with divs and it's approved?
src/style.css
Outdated
margin-left: 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.
think using this selectors should be enough .stars--1 :nth-child(-n + 1)
,
.stars--2 :nth-child(-n + 1)
etc..
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.
Well done 🏆
https://mareksax.github.io/layout_stars/
https://mareksax.github.io/layout_stars/report/html_report/