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

Html & CSS Practice. Popup #43

Merged
merged 4 commits into from
Aug 11, 2022
Merged

Conversation

HelenGreent
Copy link
Contributor

html-css-popup

Demo |
Code base

@kasionio kasionio self-requested a review August 1, 2022 16:29
Copy link
Contributor

@kasionio kasionio left a comment

Choose a reason for hiding this comment

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

Good job. But still need some improvements.

  1. You missed part of the task, the tricky one :) You need to implement this triangle
    image

  2. When a user hovers over the link it becomes "jumping". Try to solve this by adding transparent padding by default

  3. The popup menu should be centered on the toggle button (look at the picture below).

  4. Please add inner padding to the popup menu, it will look better.
    image


:root {
--main-color: lightgrey;
--bg-color: #fff;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you using HEX and RGB models at the same time?

}

*,
*::before,
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason to use pseudoelements like so?


body {
font-family: "Work Sans", sans-serif;
background-color: var(--main-color);
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

}

.header__wrapper {
max-width: 1800px;
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not looks good on big screens
image

}

.popup__list {
display: grid;
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO, it can be done with flex. Seems there is no need to use a grid model here

<input
class="add-popup__control"
type="checkbox"
id="popup-2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Try not to use names like popup-1 and popup-2. Better to specify the place or which action it handles. For example popup-more or popup-inner. Here it is okay, but imagine if you will need to add more popups on the page.

@OleksiyRudenko OleksiyRudenko changed the title Add file Html & CSS Practice. Popup Aug 1, 2022
@HelenGreent HelenGreent requested a review from kasionio August 4, 2022 22:00
@kasionio
Copy link
Contributor

kasionio commented Aug 5, 2022

Please try to make equal width for all containers, it will look better.

Screen Shot 2022-08-05 at 09 46 59

Screen Shot 2022-08-05 at 09 46 53

Copy link
Contributor

@kasionio kasionio left a comment

Choose a reason for hiding this comment

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

Nicely done! Please take a look at the screenshots below and look at the comments. This should be the final changes

  1. The container should be centered.
  2. Links in the main navigation bar should not have borders on hover. The same for More button
  3. Try to use border-radius property to make the design a little bit smoother

image

image

}

.add-popup {
position: relative;
Copy link
Contributor

Choose a reason for hiding this comment

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

You have the same property in line 82. No need to duplicate. Also check border: var(--border-hover);

padding: 0.6rem;
}

.add-popup__list-item {
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't find where you use this class in HTML. Please, don't hurry, take your time and review your code. Sometimes you need just to take a one-day rest and make a self-code-review to find some gaps. I know it from my own experience ;)

border: 1px solid transparent;
}

.popup__link-title {
Copy link
Contributor

Choose a reason for hiding this comment

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

Too complicated approach for just a text inside span. Try to optimize your code and play with properties, it can be fun :) I am sure that you don't need flex here, just in the container popup__list-item.

</div>
<a class="main__nav-item" href="#">
<img src="./images/bell.png" alt="bell"
/></a>
Copy link
Contributor

Choose a reason for hiding this comment

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

/> missed the right place ;) Move it to corresponding line.
<img src="./images/bell.png" alt="bell" /> or each attribute in a new line

<img
class="popup__link-icon"
src="./images/documents.png"
alt="doc"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please read about alt attribute and make corresponding changes.
The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).
https://www.w3.org/QA/Tips/altAttribute

@kasionio
Copy link
Contributor

Are you already done with the changes? I see the new commit, but you don't re-request review

@HelenGreent HelenGreent reopened this Aug 10, 2022
@HelenGreent HelenGreent requested a review from kasionio August 10, 2022 17:35
@HelenGreent
Copy link
Contributor Author

Yes, sorry. Just realized that you didn’t receive notifications without me pressing the re-request review button

Copy link
Contributor

@kasionio kasionio left a comment

Choose a reason for hiding this comment

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

Good job 👍

@kasionio kasionio merged commit 61d5ca4 into kottans:main Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants