Design comparison
SolutionDesign
Solution retrospective
Any feedback is welcome. I was trying to make it more responsive with the current knowledge I have. Some things I could've changed are consistency with units for the CSS, using the body instead of main in the html.
Community feedback
- @grace-snowPosted over 1 year ago
Hi
As promised in slack…
- You need a modern css reset right at the start (look up Andy bells one)
- You shouldn’t be using any heights or widths anywhere at all
- Font size must never ever be in px. Use rem
- line height mustn’t use different units on different elements. Usually it’s unitless like 1.5
- Use consistent units for things like margin
- Initial font declarations should be on body not a wildcard (bad for performance otherwise)
- Change height 100vh on body to Min height 100vh, then on the next like min-height 100dvh (a newer unit)
- Media queries should be declared in rem or em. And only start the desktop media query when there is room for the new layout (400px is still too narrow I think)
- This would be way easier to read if css was in a separate file
In HTML
- don’t use h1s for the heading. You should only have 1 h1 per webpage and this is a single component challenge not a full webpage. You can presume it would sit lower down a page
- learn more should be an anchor element not a button. Look up the difference between them
- you must add empty alt attributes to those icons so the browser knows they are decorative images
- don’t capitalise in html. Do that with css. Some screenreaders can read out letter by letter instead of whole words when text is capitalised in the html like that
Marked as helpful1
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