Design comparison
Solution retrospective
Hello Frontend Mentor Community. I'm Anyona. Here is my 4th challenge solution.
Built with;
- HTML5
- CSS
- Mobile first workflow
The challenge is good for those getting their hands dirty in CSS by building a page to a provided design.
I want to Frontend Mentor team for creating this challenge and making it available to everyone.
If there is a better way I could have went on with this challenge, feel free to let me know.
FEEDBACK is very much welcomed!
Community feedback
- @grace-snowPosted 9 months ago
I hope this feedback is helpful
- You don't need multiple reconnect links for Google fonts. You can even download all of the families an weights in one go as well.
- You need to think through the html more carefully. Try to imagine the content on its own without any styling. Those 3 stats in the component would be a list with 3 bullets so that tells you what the html needs to be.
- Do not mess with roles. There is no counter in this! That's a definite accessibility failure adding incorrect roles to content. Remove it. (And maybe go read about what it is)
- Always use a full modern css reset at the start of the styles in every project. Get into the habit now. Andy Bell has a good one you can look up and use.
- The mobile styles should be the default. That's another habit you need to get into ASAP.
- If this was a real project you wouldn't want to style all
em
tags like this. Try to approach these single component challenges like you are still building them to go into a bigger site. It would be much better to use a class selector for this kind of styling. You only want to use element selectors for setting sensible defaults at the start of a project. - Media queries must be defined in rem or em not px. This post on media queries and responsiveness is worth reading
- Don't set max width on the component to be 70%. That is making this super tiny and narrow on my small phone. For others it will be to wide. Dont use viewport widths either for max width. These units you've chosen remove all control from the layout. Use a sensible rem value for the component's max width — one value for mobile and a wider value for large screens.
- Don't set the image height in viewport units either. Again use rem or px. Or At least use a min() or max() function that also gives a non viewport based size. Think about how tiny 30vh is on a mobile landscape view or smaller phone. Way too small.
- It would actually be simpler to do the layout and much better for performance to use the picture element in this challenge and not background images. It's also bad practice to have empty divs in html.
- There is no need for a pseudo element in this challenge. You are making it harder for yourself.
- Never set font size in em. That u it compounds so it's a very dangerous precedent. It can lead to horrible bugs when you lose control of the font size. Font size should be in rem. The em unit is for other properties that you want to scale with the font size. You only une it very intentionally, like for padding on buttons so they grow proportionally when the font size is altered.
- Don't use key word values for font size either. You lose all control. The browser a user is on would then make the decisions on what that means.
- This should only have one media query. Again, read the linked article above. You should not be using both min and max width queries. Pick mobile first and have a single min width media query defined in rem or em only. Styles should not repeat in media queries either.
- Give a wrapping element like body a little padding on all sides or the component some margin on all sides. It is currently hitting screen edges when it should not.
Marked as helpful0 - @zacc-anyonaPosted 9 months ago
Thank you Grace for your feedback.
I love the way you are straight forward and concise. I really appreciate it, especially as beginner web developer it really comes as helpful.
I am going to correct those areas you have mentioned, so I don't repeat the same mistakes on my next challenge which I already started. I'm pausing working on it till I familiarize myself with the mistakes and correct them.
0
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