-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
solution #4898
base: master
Are you sure you want to change the base?
solution #4898
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 |
---|---|---|
@@ -1 +1,25 @@ | ||
/* add styles here */ | ||
body { | ||
margin: 0; | ||
} | ||
|
||
Comment on lines
+1
to
+3
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. According to the checklist, avoid using tag names for styling. It's recommended to style elements using classes. However, the |
||
.stars { | ||
display: flex; | ||
} | ||
|
||
.stars__star { | ||
width: 16px; | ||
height: 16px; | ||
background: url(images/star.svg) center no-repeat; | ||
} | ||
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. Consider adding a fallback background color for the |
||
|
||
.stars__star + .stars__star { | ||
margin-left: 4px; | ||
} | ||
|
||
.stars--1 .stars__star:nth-child(-n + 1), | ||
.stars--2 .stars__star:nth-child(-n + 2), | ||
.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: url(images/star-active.svg) center no-repeat; | ||
} | ||
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. Just like with the regular star, it's a good practice to add a fallback background color for the |
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 empty lines between multiline sibling blocks of HTML to improve readability. In this case, add an empty line after the closing tag of each '.stars' block.