-
Notifications
You must be signed in to change notification settings - Fork 6k
add solution #7280
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
base: master
Are you sure you want to change the base?
add solution #7280
Conversation
mateacademy-ai-mentor
left a comment
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.
Review Summary
Good effort on setting up the header structure with semantic HTML and Flexbox. However, some changes are needed because several key requirements were not met.
Here are the issues that need to be addressed:
- Styling by Tag Name: In
src/style.css, the<header>element is styled directly. The task requires styling elements with classes, not tag names (except forhtmlandbody). Please add a class to the header and use it for styling. - Forbidden Padding on Nav Links: The
.nav__linkclass haspadding, which is explicitly forbidden by the requirement "Nav Links should not have any padding". This also incorrectly determines the header's height. - Incorrect Header Height: The header's height should be set in one place: by applying a
heightproperty to the navigation links. Please remove the padding from the links and the margin from the logo, and instead set a specificheighton the links to control the header's size. - Invalid
hrefAttribute: Insrc/index.html, the link for "laptops & computers" contains spaces in itshrefattribute. URLs cannot contain spaces, so please replace them with hyphens.
Please fix these issues to align your solution with the project requirements.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| <img | ||
| class="logo_img" | ||
| src="images/logo.png" | ||
| alt="website logo" |
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 alt attribute should be more descriptive. While 'website logo' is acceptable, something more specific like 'Moyo website logo' would better align with best practices for accessibility.
| </li> | ||
| <li class="nav__item"> | ||
| <a | ||
| href="laptops & computers" |
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 href attribute should not contain spaces. This violates the code style rules. Consider replacing spaces with hyphens, like laptops-and-computers.
| padding: 0; | ||
| } | ||
|
|
||
| header { |
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.
According to the task requirements, you should avoid styling elements by their tag name (except for html and body). Please add a class to the <header> element in your HTML and use that class for styling.
| display: block; | ||
| height: 40px; | ||
| width: 40px; | ||
| margin: 10px 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.
This margin contributes to the header's height, but the requirement is that the height should be set in one place, on the navigation links. Also, using both top and bottom margins (margin: 10px 0) is inconsistent with the code style guideline to use only top or only bottom margins.
| text-decoration: none; | ||
| justify-content: 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.
These CSS properties have no effect here. text-decoration applies to text-containing elements like <a>, not <li>. justify-content applies to flex containers, but .nav__item is a flex item, not a container. These lines can be removed.
| text-transform: uppercase; | ||
| color: #000; | ||
|
|
||
| padding: 22.5px 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.
This violates the requirement that 'Nav Links should not have any padding'. Instead, you should set a specific height on the links (as per the Figma design) and then center the text vertically. This approach also violates checklist item #1: 'Header height is set in 1 place (for the links)', as the header's height is currently influenced by both this padding and the logo's margin.
[x] Header height is set in 1 place (for the links)
[x] Content is vertically centered (for any header height)
[x] CSS is used to show all letters in Uppercase (don't type them in HTML)
[x] Logo is an image wrapped with a link
[x] CSS Variable is used for a blue color
[x] Pseudo-element is used for a blue line below the active link
[x] Code follows all the Code Style Rules ❗️
[x] The Google Fonts Configuration follows requirements.