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 #14

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

html-css #14

wants to merge 20 commits into from

Conversation

Neepunraj
Copy link

initial pull request

Copy link

@jason-vasilev jason-vasilev left a comment

Choose a reason for hiding this comment

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

Hi, Neepun.
Super good design. I was pleasantly surprised to see that you use BEM, animations, and CSS variables.
I've left you some suggestions here and there how to optimize a bit the code or make the end result more accessible.
Great job!

Choose a reason for hiding this comment

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

This asset is quite big and could make the entire page load slow according to some Google metrics. I'd recommend you parsing it through TinyPNG or Squoosh and export it as WebP. You can see up to 97% of size improvement.

Choose a reason for hiding this comment

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

Just as the background.png, you could optimize this one, too.

Choose a reason for hiding this comment

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

This asset is 1201 x 1209 pixels but you show it in a square which is close to 250 x 250 px. If you size the asset down to 250 or 500, you would get some good points in optimization with Google Lighthouse test ;)

Choose a reason for hiding this comment

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

This asset (and maybe others) is not used anywhere on your site. Maybe you can delete it, to keep the project size small.

Comment on lines 37 to 39
<div class="profile__picture">
<img src="./img/neepun.jpg" alt="Neepun Raj" />
</div>
Copy link

@jason-vasilev jason-vasilev Jan 18, 2025

Choose a reason for hiding this comment

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

Could you move the class name down to the img tag and remove the <div> tag?

Suggested change
<div class="profile__picture">
<img src="./img/neepun.jpg" alt="Neepun Raj" />
</div>
<img src="./img/neepun.jpg" alt="Neepun Raj" class="profile__picture" />

opacity: 1
}
}
.socials__github,.socials__email,.socials__linkedin {

Choose a reason for hiding this comment

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

YOu could use one class for all those, called .socials__icon and then wrap them in a div with flex box where you use the gap property

Comment on lines 529 to 532
.contact_text{
font-size: 1.8rem;
margin-bottom: 6rem
}

Choose a reason for hiding this comment

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

This overwrites the definition from a few lines up. I guess you can remove the one up there and leave this.

font-weight: 700
}
.contact input, .contact textarea {
width: 500px;

Choose a reason for hiding this comment

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

This will cause you horizontal scroller on devices below 500px width unless you change it with a media query.

.contact input:focus,.contact textarea:focus {
outline: none
}
.contact input::placeholder,.contact textarea::placeholder {
Copy link

@jason-vasilev jason-vasilev Jan 18, 2025

Choose a reason for hiding this comment

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

Relying only on placeholder text is not good for web accessibility. It's preferred to use a <label> tag and to associate it to the input fields by using the for attribute.

display: flex;
justify-content: space-between;
top: 0;
cursor: pointer;

Choose a reason for hiding this comment

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

I'd delete this, as it's causing confusion. pointer is used for clickable elements, but here it's on the entire navigation. It misleads the user that they can click the menu items from the padding space, but actually it works only when you click exactly on the text.

@Neepunraj
Copy link
Author

Neepunraj commented Jan 18, 2025 via email

@Neepunraj
Copy link
Author

Hi,

pleas ignore portfolio commit, i am working on the changes and suggestions from above comments , will be done by Friday
and
please check the new commit on order page Thank you

Copy link

@jason-vasilev jason-vasilev 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 good.
Just try to use more class selectors and don't copy everything from Figma. Be a bit critical of what it provides you as CSS. Some properties are either too fixed to the design there, and won't apply to minor content changes, or just are unnecessary.
Keep up the good work.

height: 44px;
border: 1px solid #939393;
background-color: #f3f1f2;
font-weight: 400;

Choose a reason for hiding this comment

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

I think this might be already the default font-weight for input fields.

Comment on lines +17 to +18
height: 68px;
width: 326px;

Choose a reason for hiding this comment

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

Those values are very strict. If you suddenly add more text to the button it might not work. It's better to let it grow accordingly to the amount of copy it contains. You can best do this by removing strict width and height and instead add padding.

@@ -0,0 +1,261 @@
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

Choose a reason for hiding this comment

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

You add many variations in font-style and weight, but probably don't use all of them. This will slow down the load speed of your page and ranking in Google. See if you can remove any of this.

h2 {
font-size: 24px;
font-weight: 700;
line-height: 27.6px;

Choose a reason for hiding this comment

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

Avoid fractions of a pixel, as browsers interpret them differently and your website might look inconsistent between them.

}
.header p {
color: white;
font-family:"Montserrat", serif; ;

Choose a reason for hiding this comment

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

Suggested change
font-family:"Montserrat", serif; ;
font-family:"Montserrat", serif;

Comment on lines +24 to +27
<div class="totalContainer">
<p>Total</p>
<p>$333 / month</p>
</div>

Choose a reason for hiding this comment

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

Those are definitely not separate paragraphs, considering how short the copy is. I think it could be better marked like this:

Suggested change
<div class="totalContainer">
<p>Total</p>
<p>$333 / month</p>
</div>
<p class="totalContainer">
<span>Total</span>
<span>$333 / month</span>
</p>

<p>Total</p>
<p>$333 / month</p>
</div>
<hr />

Choose a reason for hiding this comment

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

As commented in the CSS, this <hr> could be border-top: 2px solid white; on .bigTotalContainer.



<button type="submit">Buy Now</button>
<p class="gradientText">Need help ?</p>

Choose a reason for hiding this comment

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

This is most probably supposed to be a <a>. What do you think?




<button type="submit">Buy Now</button>

Choose a reason for hiding this comment

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

Add a class name. Eg. .primary-button.

Comment on lines +41 to +44
<div class="visaCards paymentWrapper" tabindex="0">
<img src="./Images/cards.png" alt="visa cards" />
<p>Credit/Debit</p>
</div>

Choose a reason for hiding this comment

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

You've used tabindex in the effort to make this keyboard accessible. The best way to handle it would have been to make the <div> a <button>, and remove the <p> tag, as <button> anyways assumes text inside.

Suggested change
<div class="visaCards paymentWrapper" tabindex="0">
<img src="./Images/cards.png" alt="visa cards" />
<p>Credit/Debit</p>
</div>
<button type="button" class="visaCards paymentWrapper">
<img src="./Images/cards.png" alt="visa cards" />
Credit/Debit
</button>

Choose a reason for hiding this comment

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

Another approach would be to use a bit of ugly CSS selectors with <input type="radio> - https://codepen.io/menian/pen/raBZZmZ

@Neepunraj
Copy link
Author

Wow, such a detailed comments and corrections, noted and will be implementing these recommeded techniques :)

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