Submitted almost 2 years ago
QR code component using CSS Flexbox
@rStrzelczyk98
Design comparison
SolutionDesign
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML π:
- Use semantic elements such as
<main>
and<footer>
to improve accessibility and organization of your page.
- Since this component involves scanning the QR code, the image is not a decoration, so it must have an
alt
attribute. Thealt
attribute should explain its purpose. e.g.QR code to frontendmentor.io
CSS π¨:
- Instead of using pixels in font-size, use relative units like
em
orrem
. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here π.
- The
width: 100vw
property in thebody
tag is not necessary. This will create a horizontal scrollbar on some devices.
- Use
min-height: 100vh
instead ofheight: 100vh
. Theheight
property will not work if the content of the page grows beyond the height of the viewport.
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0@rStrzelczyk98Posted almost 2 years agoHi @MelvinAguilar
Thanks for your feedback. I will apply your suggestions to this and later projects.
1 - Use semantic elements such as
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