Managed to get it working pretty well and close to the design. I think my card numbering is off so would make sure that is correct in mobile first before starting desktop
py-code314
@py-code314All comments
- @achallettSubmitted 3 months agoWhat are you most proud of, and what would you do differently next time?@py-code314Posted about 1 month ago
Hello,
Good job working on the solution ππΌ. It looks good on both mobile and desktop screen sizes. Kudos for good use of CSS Grid
As I went through your code I thought I could make some suggestions to improve the code. Here they are:
HTML:
- For
.card
class you can use <figure> instead of <div> if you wanna use semantic HTML tags. Then you can use <figcaption> for.card__user_profile
- You can also wrap testimonial text inside <blockquote> and two <p>s instead of two separate <div>s to make it more accessible
- The images are mostly decorative so you can leave 'alt' empty. I believe it's not a good practice to use 'picture' or 'photo' in alt text
CSS
- You can add more custom variables like 'font-size', 'font-weight' and 'spacing' variables in
:root
if you wish - I suggest to use a global CSS reset either by Andy Bell or Josh Comeau
- Around 600 - 800 px screen width some cards have too much gap between second paragraph and bottom border and I guess it's because of
min-height
you have in.card
- Border around images looks a little thicker in design files. You can probably use 2px there
Don't have too many suggestions π and hopefully these are helpful to you. Wish you all the best!
0 - For
- @Untest57Submitted about 2 months ago@py-code314Posted about 2 months ago
Hello,
nice job with the project. Thought I could give you some suggestions regarding your code.
- I noticed that your
/src
folder contains all the projects. Aren't we supposed to make separate repos for different projects? - It's better not to use <br> in h1. Please refer to this MDN article . Instead you can use
display: block
on <span> - Is there a reason you used two different methods when defining the colors in
colors.scss
? - I think rather than limiting the width of <body>, better approach would be using
justify-content: center
. You also don't needmargin: 0 auto
- Text in
.header__description
taking up whole width of the screen when screen size goes below 768px. I think it's a bug and you can usemax-width
inch
units to fix that - It should be 4 rows in the grid with height - auto on them in desktop view
- We shouldn't give fixed width and height to cards. Width should be defined in
grid-template-columns
property and contents of the card should determine the height .cyan
&.blue
should be occupying middle 2 rows,.red
should be occupying top 2 rows and.orange
bottom 2. I can't figure out how 'cyan' & 'blue' sitting in the middle like that lol- Border radius can be increased to match the curve in design
These are just suggestions and hopefully helpful. All the best
Marked as helpful1 - I noticed that your
- @Antonio-RiccelliSubmitted 3 months agoWhat are you most proud of, and what would you do differently next time?
I'm happy that I used a preprocessor like SASS for the first time in a project. I knew of it but never quite managed to use one for something.
Next time I would plan a bit more the HTML structure ahead of starting.
What challenges did you encounter, and how did you overcome them?The real challenge was finding the right sizes and values for certain properties and making the whole layout responsive and coherent.
What specific areas of your project would you like help with?- I would like to know if my choice of HTML semantic tags was correct.
- I'd like advice as to whether my SASS code can be simplified.
Also, a piece of advice:
- I keep getting an error in the HTML report saying
Element "p" not allowed as child of element "hgroup" in this context. (Suppressing further errors from this subtree.)
This doesn't seem to make sense, as the
hgroup
header exists precisely to wrap these type of tags: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroupI could be wrong though!
@py-code314Posted 2 months agoI also got the same error and then I found this post from 'stack overflow'. I am still confused to use it or not π
1 - @suzzy-dszySubmitted 3 months agoWhat are you most proud of, and what would you do differently next time?
- First time using SASS/SCSS after learning from an online tutorial. I learnt how to implement the SASS file structure, variables, nesting, functions and mixins.
- First time using BEM methodology which turned out to be quite helpful and i quite like it.
- First time trying out a mobile first approach which helped me understand the strengths and weaknesses of such a workflow.
- Researching online helped me solve a lot of responsiveness issues i was facing, all hail stack overflow π―. -Further improved my understanding of my base CSS knowledge especially CSS Grid & Flexbox.
- In short a lot of first time experiences π₯³.
- Initially struggled with figuring out the SCSS file structure that would be most suitable, i.e;
- What should go in my
main.scss
, how many scss files do i need and for what purpose, and after some research i was able to find the base layout of what is usually done then went ahead from there. - Nesting was very confusing at first but quickly learnt what i was doing wrong and how i could leverage BEM to target exactly what i wanted.
- What should go in my
- The preview looks good on small devices up to medium laptop screens but on large screens in my opinion the product card looks too zoomed in. I followed a mobile first approach and i guess that's where the issue is? I'm not sure, but I would've like the product card to look a bit smaller and centered on larger screens so that it looks a bit more aesthetically pleasing to the eyes. So if anyone has any tips on what i could do differently next time please feel free to share. -Also, since this is my first -time using SCSS, any tips/tricks would be much appreciated for example on how to optimize code / file structure, etc.
-Thank you in advance π.
@py-code314Posted 2 months agoHello, congrats on finishing your project. I've just finished this project and I also used Sass for first time to do it. So, cheers to that ππΌ
As I went through your code, I thought I could make some suggestions
HTML:
- You should use <picture> element to switch the images depending on mobile and desktop views instead of wrapping them in <div>. Please refer to this article on how to do that
- For 'Perfume' it's best to use <p> tag as it's better to avoid <h2> before <h1> for accessibility purposes. Also it's recommended to change it to uppercase by using CSS, not in HTML itself
- For strikethrough old price, please use either <s> or <del> tag as it is more semantic
- Your BEM nomenclature of classes looks good ππΌ
- Finally, I suggest this article by Grace Snow if you want to improve your HTML
CSS:
- In your '_config' file you can also add variables for font-size and spacing if you want
- Use 'rem' or 'em' for @media instead of px for better responsiveness
- You already have
border-radius
on.product-card
, so I don't think you need it on 'mobile image' too - You don't need 'visibility' and 'position' properties for images if you use <picture> element and grid properties
.product-card max-width
is not 1000px in desktop view (I think that's why card is bigger than in the design file), it's only 600px (use rem here for better responsiveness) and in mobile viewmax-width
is 343px- I don't think font-size for 'content' is increasing from mobile to desktop. Can you please double check that!
- I believe new syntax to import partials is @use
- I suggest adding
btn: focus
andbtn: active
statuses to your code - To center #main
body { display: flex; justify-content: center; align-items: center; }
Hopefully these suggestions make your project better. Please contact me if you have any further questions. All the best. Happy coding π
Marked as helpful1 - @zmora2622Submitted 3 months agoWhat specific areas of your project would you like help with?
I mainly need help with css class naming and bem methodology and table styling. The designs between figma and screenshot vary a lot in padding, margins and gaps. Therefore, at the end of development, very often the code has to be changed or re-written.
@py-code314Posted 3 months agoHello,
Congrats on finishing the project ππΌ.
I really like the code and I think I can help with a few minor things:
- I noticed that you changed
font-size
to 62.5%. You might wanna read this article before you do that - It's better to also add
max-width: 100%
to <img> in Reset. - It's good to use rem units for
max-width
in.card
instead of px to get better responsiveness - You can use rem units for padding and margin too. I think that makes it more responsive
- What about using 'padding' instead of 'height' in
.recipe__nutrition-table-cell
? - May be there's a better way to organize media queries! Group them together instead of writing at multiple places?
Finally a question for you! You added margin to
.grid
. How did you come up with those values? I'm asking because I couldn't center the card vertically in the <body>All the best. Happy codingπ
Marked as helpful0 - I noticed that you changed
- @NeonCodesSubmitted 3 months agoWhat are you most proud of, and what would you do differently next time?
I am proud of the final result for the h1 title. Next time, I need to review some of the basics (line breaks in HTML, Box model in CSS for instance)
What challenges did you encounter, and how did you overcome them?I spent a significant amount of time wondering: 1- How to move the second half of the text to the bottom: I though I had to use some complex CSS code or something. After first googling it, I used a tag. 2- Later, after looking at the picture of the final result, I realised there was too much space between the two lines in the title. Again, went thinking it was CSS related. I ended googling it again and found the tag--which, for some mysterious reason, I forgot existed--, and that ended up fixing it. I also googled how to make the image's corners round.
What specific areas of your project would you like help with?I need help with the paragraph in grey: It still doesn't look like the image preview, despite having the font-size indicated in the style-guide.
@py-code314Posted 3 months agoHello,
That's a nice job for your first projectπ. Though I noticed a few issues in the code which I think can help you with.
HTML
- Put everything in the 'body' in a container and give it a
max-width
so that you can limit the width of whole content. Your card is too big in comparison to the design file - You won't need
<br>
in<h1>
if you do that. It's unnecessary! - Same goes for
<br>
s in<p>
- Describe about the image in
alt
attribute
CSS
- Why do you have three 'hsl' in
h1{color}
? - 'h1'
font-size
is too large. You can check the design file for correct size - Paragraph
font-size
is OK but the color is wrong. Check design file for the color - Use
rem
instead ofpx
forfont-size
as it makes the text responsive - There's no need for
background-color
inimg
- Use Global Reset at the beginning of code so that you won't have to repeat the properties
- Use
display: flex
in 'body' to place card in the center
Hope these will help you to make your project better. Let me know if you need any further help. All the best!!
Marked as helpful0 - Put everything in the 'body' in a container and give it a
- @AlvaroPratesSubmitted 3 months agoWhat challenges did you encounter, and how did you overcome them?
As this project has specific layout requirements for various devices, I have started learning about
rem
units and themax-width
CSS property to enhance page responsiveness. Additionally, Iβve explored media queries to adjust the profile cardβs design for different screen sizes. I think I did a good job on those.@py-code314Posted 3 months agoHello,
Great job. Looks almost identical to the original design file. But I noticed a few issues regarding responsiveness.
- Content is overflowing when zoomed in. Change
height
tomin-height
in.main-content
to prevent that - When I make the screen narrow, around 1030px mark card is increasing in width. You might wanna check why that's happening
- You will benefit from adding some kind of CSS Reset on top of the code. Just google it for any modern css reset
- Do some research about
clamp()
function. You can use it effectively to avoid writing multiple media queries - You can use
<blockquote>
element for.profile-bio
if you want. I think it's more semantic
I hope these will help you to get better. Cheers!
Marked as helpful1 - Content is overflowing when zoomed in. Change
- @achallettSubmitted 3 months agoWhat are you most proud of, and what would you do differently next time?
Understanding how padding and margin behaves better
What challenges did you encounter, and how did you overcome them?Had an issue understanding the spacing initially
@py-code314Posted 3 months agoHello,
Nice job on the project. I think it's very close to the design specifications.
I would like to point out a few things if you don't mind.
- When the screen size is narrower than 400px, card content is hiding behind the screen edge. I suggest you change
width
on.card
tomax-width
to make it flexible - There's a thin blue outline around the links when I focus them with TAB. You can remove this with
outline: none
if you want - I think it's better to use
<p>
and<blockquote>
tags for.card__profile_location
and.card__profile_bio
as they describe the content more accurately - I also noticed that you used
<div>
s to wrap social media links. You should put them in<a>
tags as they are links when clicked take the user to another page. In addition you can put all links in a<ul>
element if you want - No need to use
width
on body as it may add scrollbar sometimes. Also it's a good practice to usemin-height
instead ofheight
on body
Hopefully these points will help you to make it better. All the best!
Marked as helpful1 - When the screen size is narrower than 400px, card content is hiding behind the screen edge. I suggest you change
- @MorganMartin12Submitted 3 months agoWhat are you most proud of, and what would you do differently next time?
I am proud of the speed at which I was able to complete this challenge.
What challenges did you encounter, and how did you overcome them?I was unaware of how to implement hover. I looked it up.
What specific areas of your project would you like help with?I still want to know how to use SASS better and maybe what elements that are divs should be replaced with more semantic html.
@py-code314Posted 3 months agoHi,
Nice job on the project. Congratulations!!
I think I can make a few suggestions to improve the code.
- The card is not responsive enough. If the screen width is below 400px the sides are getting cut off. I think you can fix this by changing
.course-card
max-width units to rem - I suggest giving
.course-card
some padding to create the space instead of margins on child elements - When I zoom it to 200%,
.attribution
content is going inside the card. You can fix it by changing units to 'rem' instead of 'px' - Font-size of text in
.course-card__label, __date
and__author
supposed to be 14px. You might wanna check that - I am not able to access
h2
by using keyboard. You can wrap it in<a>
tag and add 'focus' pseudo class to make it keyboard accessible
Hope these points would be of help to you. All the best!!
Marked as helpful1 - The card is not responsive enough. If the screen width is below 400px the sides are getting cut off. I think you can fix this by changing
- @PECUIHESubmitted 3 months agoWhat are you most proud of, and what would you do differently next time?
I'm proud I could do it myself and I believe I can do better with the future projects.
What challenges did you encounter, and how did you overcome them?In making the design align at the centre of the body but I was able to use display flex to achieve it.
What specific areas of your project would you like help with?I would like to know the difference between the em, rem and px sizes, and where and when best to use any in projects.
@py-code314Posted 3 months agoHello,
I like your code, clean and concise! Only thing I suggest you put your code in a separate file. These videos might help you to know more about rem and em -
All the best!!
Marked as helpful1 - @anwar-elbarrySubmitted 3 months agoWhat are you most proud of, and what would you do differently next time?
I am proud of my focus on details and finding solotions ,even if it takes me 4 hours or more . Nex time , I will focus on code aesthetics , Organization ,And writing more comments.
What specific areas of your project would you like help with?i want to make it more responsive
@py-code314Posted 3 months agoHello,
Nice job on the project. I think it is responsive enough, although I wanna make some suggestions.
- When I zoom-in, the top part of the card is going out of view. May be you can use
min-height
instead ofheight
onbody
to prevent that h2:hover
is working buth2:focus
isn't working. I suggest you wraph2
in<a>
tag to access it with keyboard- You shouldn't apply
height
to any container with text as it leads to overflow problem when you add more text - Do not use
px
units forfont-size
as users can't increase font size in their browser. Userem
orem
depending on the context - There's an abrupt jump in size when the screen size reaches more than 390px. You might wanna make it a smooth transition
- To make it more responsive I suggest apply
max-width
to card only. Then everything in the card will adjust itself when you decrease screen width. You don't even need media query if you useclamp()
to reduce font size
All the best. Happy coding :)
Marked as helpful0 - When I zoom-in, the top part of the card is going out of view. May be you can use
- @mts-mlSubmitted 3 months agoWhat are you most proud of, and what would you do differently next time?
Still need more practice to be proud/have doubts.
What challenges did you encounter, and how did you overcome them?Despite this being a simple project, i still had no idea how to begin, i actually looked at the blank page for some time before the idea came to me.
What specific areas of your project would you like help with?I actually want to know if it's common to use rem instead os px, i usually set up the css like: :root { font-size: 62.5%; } So, instead of 10px i use .1rem. I saw a guy explaining that it's better for the user. Is it really?
Note: English is not my native language.
@py-code314Posted 3 months agoHi,
Your project looks good! But the title text looks a little smaller than the specifications to me.
You can read this article about why you always want to use
rem
forfont-size
. Also this one for why you don't want to setfont-size: 62.5%
onbody
elementHope these articles will help you make a decision. All the best!!
Marked as helpful0