
Design comparison
Solution retrospective
Although i think i did poorly with this project, i think i am getting better at bringing designs to life.
What challenges did you encounter, and how did you overcome them?aligning the nutrition list
Community feedback
- P@RahexxPosted 4 months ago
Yes, you are making progress! :) This challenge was tougher than your earlier challenges, so overall, good job. I have some advice for you that you can use for your next challenge:
-
Great that you used tags like
main
, but you can group elements like instructions under one tag, e.g.,section
. This would help you divide the project into bigger elements, and you can replacediv
. For example, for the nutrition list, you useddiv
, but this could be asection
tag. -
For the
img
tag, thealt
attribute should never be empty. This is for accessibility: if someone has vision problems and uses a screen reader, they won't know there is a picture. Additionally, thealt
should describe what is in the picture. My examplealt
for an image might look like this:"Image of an omelette with some green vegetables and tomatoes on a white plate."
Thanks to that, someone will know what the picture shows without seeing it. Of course, I made a mistake here because colors are unnecessary—"green vegetables" or "white plate" could be without color information. -
I know that I wrote to you about BEM, but even without using this methodology, it is great to use classes. This makes it easier to read what you're styling because styling only tags is more difficult; you can lose track of what you’re doing. When you have a class like
.ingredients
, you know exactly what you’re styling, and if you have something like.ingredients_list
, you know what element it is. -
Make sure that in your project, there are no whitespaces like
22g
because it creates problems with positioning. If you want to create some spacing for elements like in.nutrition-list
, make sure there are no whitespaces in tags. Set them awidth
, and then set spacing. If each element has the same width and text alignment, you can properly align them with the rest of the elements. -
Read about custom properties because then you can use variables in CSS, which allows you to make changes in one place if you make a mistake.
-
Read about media queries for CSS. This way, you can adjust your design to different screen sizes.
-
About CSS, please check my solution: Rahexx-RecipePage. This file is written in SCSS, but this project was made before I started using GitHub Actions. You will find a
css
folder there with CSS files compiled from SCSS. Check how I managed spacing in this project. This SCSS may not follow all best practices, but it can serve as a starting point for learning how to create spacing, use pseudo-elements, implement media queries, and style numbered lists inol
. -
You can replace the
hr
tag withborder-bottom
or a pseudo-element, like I did.
Overall, good job, and fingers crossed for your further progress!
Marked as helpful0@jhenniiferPosted 4 months ago@Rahexx I appreciate that you take your time critique my work, thank you. I started studying custom properties and BEM after this project. I will incorporate them in my next project
1P@RahexxPosted 4 months ago@jhenniifer I'm happy to hear that. I personally always like good code review, so I try to pass as much knowledge as I can. It's great that you're already learning custom properties and BEM – those will definitely make a big difference in your next projects. Keep it up!
1 -
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord