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

New solution #5387

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

New solution #5387

wants to merge 4 commits into from

Conversation

Oleksiy0909
Copy link

  • DEMO LINK

  • TEST REPORT LINK

  • [ 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 ❗️

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 work on your Pull Request! 👍 Just a few minor points to keep in mind for future projects: Consider removing redundant CSS properties, fixing any syntax errors, adding fallback font-families, using descriptive alt text for images, and maintaining consistent formatting and indentation in your code. These small improvements will make your code even better! Keep it up! 😊

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

Comment on lines +32 to +42
<header class="header">
<a
href="#"
class="header__link"
>
<img
class="header__logo"
src="./images/logo.png"
alt="logo"
/>
</a>

Choose a reason for hiding this comment

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

Remember about correct indentation between parent and child elements. The <a> tag should be indented by 2 spaces inside the <header> tag, and its child <img> tag should be indented by 2 spaces inside the <a> tag.

<link
rel="stylesheet"
href="./style.css"
/>
</head>
<body>
<h1>Moyo header</h1>
<header class="header">
<a

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. Anchor links should start with the # symbol and should not have spaces.

Comment on lines +33 to +41
<a
href="#"
class="header__link"
>
<img
class="header__logo"
src="./images/logo.png"
alt="logo"
/>

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. If the HTML element has long attribute values or more than 2 attributes, start each one, including the first, on a new line with 2-space indentation related to the tag.

Comment on lines +44 to +118
<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="#"
class="nav__link is-active"
>
Apple
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Samsung
</a>
</li>
<li class="nav__item">
<a
href="#"
class="nav__link"
>
Smartphones
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
data-qa="hover"
>
Laptops & Computers
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Gadgets
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Tablets
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Photo
</a>
</li>

<li class="nav__item">
<a
href="#"
class="nav__link"
>
Video
</a>
</li>
</ul>
</nav>

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 add some 'air' and simplify reading. But don't add them between parent and child elements.

>
<img
class="header__logo"
src="./images/logo.png"

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. Instead of 'logo', a more descriptive text could be used.

@@ -1,3 +1,79 @@
body {
margin: 0;
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.

It's good practice to specify a fallback font-family, in case the primary font cannot be loaded. Consider adding a generic font family as a fallback.

justify-content: space-between;
align-items: center;
padding: 0 50px;
box-shadow: 0 2px 4 px rgba(0 0 0 0.05);

Choose a reason for hiding this comment

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

There is a syntax error in the box-shadow property value. The color function rgba should have commas separating the values.

}

.nav {
display: block;

Choose a reason for hiding this comment

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

The .nav class has a display: block; property, which is the default display value for the nav element. This line can be removed as it is redundant.

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Hi, your demo link isn't working, you need to make a deploy and check it after on the demo
image

Comment on lines +62 to +63
</li>
<li class="nav__item">

Choose a reason for hiding this comment

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

Add the blank line between the all links

Suggested change
</li>
<li class="nav__item">
</li>
<li class="nav__item">

@@ -1,3 +1,79 @@
body {
margin: 0;
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.

Move font styles to the html selector

}

.is-active {
color: #00acdc;

Choose a reason for hiding this comment

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

Create a variable for repeated color and use it everywhere

src/style.css Outdated Show resolved Hide resolved
Co-authored-by: Volodymyr Soltys <64750958+volodymyr-soltys97@users.noreply.github.com>
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