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

task solution #5381

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

task solution #5381

wants to merge 2 commits into from

Conversation

D0dgerJ
Copy link

@D0dgerJ D0dgerJ commented Sep 18, 2024

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

You've done a fantastic job on this Pull Request! 👍 However, there are a few issues with href attributes containing spaces, and some best practices that we can improve upon, such as using fallback fonts, avoiding the * selector for better performance, and ensuring consistent indentation. Fixing these will make your code even more robust and maintainable! Let's make those changes and you'll be all set. Keep up the great work! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

src/index.html Outdated
Comment on lines 28 to 37
<header class="header">
<a
href="/"
class="logo-link"
>
<img
src="images/logo.png"
alt="MOYO Logo"
class="logo"
/>

Choose a reason for hiding this comment

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

There should be an empty line between multiline sibling blocks of HTML. Please add an empty line after the closing </a> tag and before the <nav> tag to improve readability.

src/index.html Outdated
Comment on lines 33 to 37
<img
src="images/logo.png"
alt="MOYO Logo"
class="logo"
/>

Choose a reason for hiding this comment

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

Ensure that the alt attribute of the <img> tag describes the content of the image. 'MOYO Logo' is a good description, but if 'MOYO' has a specific meaning or is a brand, including that context could be beneficial (e.g., 'MOYO Electronics Brand Logo').

src/index.html Outdated
Comment on lines 42 to 46
<a
href="#"
class="nav__link is-active"
>
Apple

Choose a reason for hiding this comment

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

Avoid using spaces in the href attribute of the <a> tag. If this is meant to be a placeholder, consider using '#apple' to indicate the intended target section.

src/index.html Outdated
Comment on lines 50 to 54
<a
href="#"
class="nav__link"
>
Samsung

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. Use '#samsung' as the value if this link is meant to direct to a Samsung section.

src/index.html Outdated
Comment on lines 58 to 62
<a
href="#"
class="nav__link"
>
Smartphones

Choose a reason for hiding this comment

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

Similar to the previous comments, ensure the href attribute does not contain spaces. Use '#smartphones' for better clarity.

src/index.html Outdated
Comment on lines 91 to 95
<a
href="#"
class="nav__link"
>
Photo

Choose a reason for hiding this comment

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

The href attribute should be free of spaces. Use '#photo' as the href value.

src/index.html Outdated
Comment on lines 99 to 103
<a
href="#"
class="nav__link"
>
Video

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. Use '#video' as the href value.

src/style.css Outdated
Comment on lines 5 to 8
* {
margin: 0;
padding: 0;
box-sizing: border-box;

Choose a reason for hiding this comment

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

Don't use * selector as it impacts performance. It's better to set styles only for elements that require them. If you need to reset default margins and paddings, consider using a more specific reset CSS or applying these styles only to the elements that need them.

src/style.css Outdated
}

html {
font-family: Roboto, sans-serif;

Choose a reason for hiding this comment

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

Remember to use fallback fonts - alternative font-family in case the main one doesn't work. For instance, you could specify a generic font family like 'sans-serif' as a fallback.

}

.nav__item {
margin-right: 20px;

Choose a reason for hiding this comment

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

Be consistent with your vertical margins. It's recommended to add only top or only bottom margin, but not both, to prevent issues with margin collapse. In this case, consider using only margin-bottom for .nav__item.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on the Pull Request! Just a few minor points to consider for the future: remember to maintain consistent vertical margins, use fallback fonts, avoid styling with tag names, and watch out for spaces in href attributes. Also, keep your alt text clean and ensure consistent indentation in your code. These small tweaks can make your code even better! Keep up the good work! 😊👍

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

>
<img
src="images/logo.png"
alt="MOYO Electronics Brand Logo'"

Choose a reason for hiding this comment

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

The alt attribute should describe the image content, but avoid using special characters like single quotes at the end unless they are part of the actual description. It should be alt="MOYO Electronics Brand Logo".

<a
href="#laptops-computers"
class="nav__link"
data-qa="hover"

Choose a reason for hiding this comment

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

Don't use spaces in <a> tag's href property. The href for 'Laptops & Computers' contains a space, which should be replaced with a hyphen or underscore (e.g., href="#laptops-computers").

Comment on lines +5 to +8
ul,
ol {
padding: 0;
}

Choose a reason for hiding this comment

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

Don't use tag names for styling (except html and body). Style elements using .class. In your case, you could create a class like .list-reset and apply it to ul or ol where necessary.

Comment on lines +10 to +26
body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li,
figure,
figcaption,
blockquote,
dl,
dd {
margin: 0;
list-style: none;
}

Choose a reason for hiding this comment

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

Avoid using tag names for styling. It's better to use classes to avoid unintended side effects on other elements of the same type. For example, you might not want all p tags to have no margin in every context.

}

html {
font-family: Roboto, Arial, sans-serif;

Choose a reason for hiding this comment

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

Remember to use fallback fonts - alternative font-family in case the main one doesn't work. For instance, 'Roboto', 'Arial', sans-serif could be specified as 'Roboto', 'Arial', 'Helvetica', sans-serif.

Comment on lines +38 to +44
.nav__item {
margin-right: 20px;
}

.nav__item:last-child {
margin-right: 0;
}

Choose a reason for hiding this comment

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

Be consistent with your vertical margins. You're adding right margin to .nav__item which is horizontal, but make sure you apply the same principle to vertical margins as well, by adding only top or only bottom margin but not both.

Copy link

@anastasiiavorobiova anastasiiavorobiova left a comment

Choose a reason for hiding this comment

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

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants