Design comparison
Solution retrospective
I tried out a lot of new and different things in this challenge, and boy has it been a journey. I changed the way I write my css and did this whole challenge with a mobile-first approach, as well as using SASS and CSS grids for the first time. As a result, the code is slightly messy and I definitely could have done a better job organizing my stuff, but I'm still happy that I managed to complete this challenge and learn new things. Any advice and feedback, especially on the grid and SASS part, would be highly appreciated.
Community feedback
- @pikapikamartPosted about 3 years ago
Hey, again, awesome work on this challenge. Desktop layout looks fine but the responsiveness could be better because if you resize to like point 800px, you will see that the layout is destroyed. But on the other hand, mobile state looks really great.
Some suggestions would be:
- Remove the
overflow
from themain
tag. If you inspect that layout in dev tools at the bottom, you will notice that the site is not scrollable because of the declaration. - On your
.container
selector, thegrid
should have this value:
"header hero" "body hero"
Then on the
.image-container
addgrid-area: hero
. You mistakenly used thegrid-area: hero
on theimg
tag itself and not on the container of theimg
.- Also, you again when inspecting at the bottom, the text are being pushed up top, you might want to address that one out.
- Never hide a website logo. Remember that a website-logo is one of the meaningful images on a site so always make them visible. Since you are using
svg
rather thanimg
, yoursvg
should have or looks something like this:
<svg role="img"> <title id="base-apparel">base apparel</title> </svg>
This way, it will be read by screen-reader.
- For the
form
you should have added a.preventDefault()
when submitting so that it won't refresh the site and the user could have re-input proper values. - The
button
should have thearia-label
not thesvg
. Thesvg
should be hidden as well since it is only a decorative image so usearia-hidden="true"
on it. - Also, a proper way of doing error on a form and linking them up to their respective
input
should look something like this: INPUT
if ( input is wrong ) input.setAttribute("aria-invalid", "true"); input.setAttribute("aria-describedBy", id of the error-message); else input.removeAttribute("aria-invalid"); input.removeAttribute("aria-describedBy");
The error-message element should have an
id
attribute which is referenced by thearia-describedBy
attribute on theinput
element. By doing that, your user will know that the input is wrong because ofaria-invalid
and they will know what kind of error they made because of thearia-describedBy
. If you are confused about that one, have a look at this simple accessible form snippet that I have. If you have queries about this one, let me know so that I could help with it ^^- Lastly, just addressing the responsiveness issue.
Aside from those, great job again on this one.
Marked as helpful1 - Remove the
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