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 Module Project #660

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

Conversation

SyedArslanHaider
Copy link

Your Details

  • Your Name:SYed Arslan Haider
  • Your City: Barcelona
  • Your Slack Name: Syed Arslan Haider

Homework Details

  • Module: HTML-CSS
  • Week: 4

Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for cyf-module-project-html-css ready!

Name Link
🔨 Latest commit e926886
🔍 Latest deploy log https://app.netlify.com/sites/cyf-module-project-html-css/deploys/670a7b6aa55fee000814bef8
😎 Deploy Preview https://deploy-preview-660--cyf-module-project-html-css.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@nsi88 nsi88 left a comment

Choose a reason for hiding this comment

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

The page looks really nice. Well done.
Left some comments. Feel free to ignore them if not enough time. They are just recommendations.

If you will be answering to my code comments, pls try to answer to the particular comments. I mean, not by a single big answer in the end. It's hard to find in the big answer what part is related to what)

Also please write your own comments in the PR whenever you want me to pay attention to a particular place. Maybe you have difficulties in there or you just feel proud and want to share the solution

margin-right: 30px;
}
.burger-button {
display: none;
Copy link

Choose a reason for hiding this comment

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

Why is it hidden? Just work in progress? Or it's not needed for this design?

Copy link
Author

Choose a reason for hiding this comment

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

Nice Question!
"The burger button is hidden because it's unnecessary when the page is displayed in the web view (for larger screens). I activate the burger button for mobile displays using media queries. This way, it's only visible and usable when the page is viewed on a mobile device."

header {
height: 100px;
display: flex;
position: relative;
Copy link

Choose a reason for hiding this comment

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

Did you already learn the differences between position static, relative, absolute, etc?
Why do you need relative in this case?

Copy link
Author

Choose a reason for hiding this comment

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

"I used position: relative on the header because I want to reposition the navigation when applying media queries for mobile devices. On mobile, the navigation (header nav) is set to position: absolute, allowing me to control its position using the top, bottom, left, and right properties. By setting the parent (header) to position: relative, I ensure that the absolutely positioned navigation is placed relative to the header, making it easier to position the nav exactly where needed for mobile layouts."

Copy link

Choose a reason for hiding this comment

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

Makes sense. Nice one

css/store.css Outdated
display: flex;
position: relative;
}
header :nth-child(2) {
Copy link

Choose a reason for hiding this comment

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

A similar feedback as in the past. nth-child in css is unreadable. Also it's problematic to use in more real life scenarios when content is added dynamically to the page.
Can you think of a way to avoid using it in here?

Copy link
Author

Choose a reason for hiding this comment

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

"It's a bad habit of mine to use nth-child without fully considering the potential issues, but I'll make sure to avoid it in the future and look for more reliable solutions."

css/store.css Outdated
border-radius: 10px;
box-sizing: border-box;
}
.address11 {
Copy link

Choose a reason for hiding this comment

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

address11 and address12 are exactly the same.
We can use just address.

Copy link

Choose a reason for hiding this comment

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

Again try to create reusable classes. What I wrote in another comment.
Class is "one of". For example "One of address fields"
Whenever there is a class address1 in your code, it's a sign that we need two classes in there:

  1. Common for all address fields;
  2. A modifier for a particular address field.

Copy link

Choose a reason for hiding this comment

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

Continuing with the address example.
Let's say you have 2 address fields. The first is required and has to be filled, the second is optional.
Instead of creating classes "address1" and "address2", a better way is to create classes "address" and "required".
This way if you later need a third address field, you don't need to edit your css. You will just reuse the "address" class.
Also maybe you will have other required fields having some similarities. Then the "required" class can be reused as well.

Copy link

Choose a reason for hiding this comment

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

A bit more on the "required" class for address.
You could add "*" in css. It would be something like this:

.required::after {
  content: '*';
}

Haven't tested this code. Please tell if you will try and it doesn't work. Can look into it.

Copy link

Choose a reason for hiding this comment

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

"::after" above is a so called "pseudoelement" You can read more in here for example https://developer.mozilla.org/en-US/docs/Web/CSS/::after

Copy link
Author

Choose a reason for hiding this comment

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

"Yes, it's a good approach to use just one class instead of multiple. I completely agree with you, and I'll work on resolving it. Thank you so much for your support!"

Copy link
Author

Choose a reason for hiding this comment

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

A bit more on the "required" class for address. You could add "*" in css. It would be something like this:

.required::after {
  content: '*';
}

Haven't tested this code. Please tell if you will try and it doesn't work. Can look into it.

"I used the .quote class to automatically add quotation marks before and after the content, and it works well. I’ve tested it, and everything seems fine."

store.html Outdated
<legend>Select a Color:</legend>
<div class="radio-group">
<div class="radio">
<input type="radio" id="orange" name="orange1" value="orange">
Copy link

Choose a reason for hiding this comment

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

Only one color can be selected, right?
You need to use the same name for all the color inputs. "color" for example

Copy link
Author

@SyedArslanHaider SyedArslanHaider Oct 4, 2024

Choose a reason for hiding this comment

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

"Right, I will correct it "

@nsi88
Copy link

nsi88 commented Oct 5, 2024

It all looks good to me Syed. Well done man.
Pleas tell if there are places in the code where you want my attention.
Otherwise I review a bit selectively. Not every line.

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.

2 participants