Qr code component using semantic HTML, Sass and Bem
Design comparison
Solution retrospective
The result match very good with the design provided.
What challenges did you encounter, and how did you overcome them?It was a simple but nice challenge.
What specific areas of your project would you like help with?Any feedbacks and suggestions are welcome.
Community feedback
- @superpooperxxxPosted almost 2 years ago
Hello, Antonio, good job ! I really liked you used BEM and SASS in this project🔥
The only thing, I would recommend using regular <p> tag here instead of <h2>, because in semantics <h2> usually means a title for some big section, but here it is just a paragraph.
<h2 class="qrCode__subTitle"> Scan the QR code to visit Frontend Mentor and take your coding skills to the next level </h2>
Marked as helpful0@antoruPosted almost 2 years agoHI @superpooperxxx !
Thank you for your tip!
Regards, Antonio
0@superpooperxxxPosted almost 2 years ago@antoru also as you are using BEM + SASS is a good practice to have a separate .scss file for each BEM block. Create a folder blocks with a file _qrCode.scss and move .qrCode styles there.
And you are using @import which is an old approach, check this video
0@antoruPosted almost 2 years ago@superpooperxxx
in this project there is only one block and I think that it can be fine without an additional folder.
Thank you for the interesting video about @use and @forward in sass.
Regards, Antonio
0 - @vanzasetiaPosted almost 2 years ago
Hi, Antonio!
Next time, provide the non-minified CSS so that people can easily give feedback on the stylesheet. It is a lot of work to open each Sass file.
Here are some suggestions for improvements:
<figure>
does not need to wrap the<img>
element. Only use<figure>
when you need to include a<figcaption>
.- Alternative text for images should not include any words that are related to the word "image". The semantic meaning of the
<img>
element tells assistive technologies to pronounce it as an image. - Improve the alternative text by adding more information about the QR code. Tell the users what will happen after they scan it. It is navigating to a website then the alternative text can be "QR code to [site URL or website name]".
- Set font styling on the
<body>
element. Most of the elements will inherit the font styling of the<body>
element.
I hope this helps. Happy coding!
0@antoruPosted almost 2 years agoHi, Vanza!
Thank you for your feedback!
Regards, Antonio
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