Design comparison
Solution retrospective
Could you recommend me the right way of structurize my css code.
Community feedback
- @john-miragePosted over 1 year ago
Hello,
I recommend you the BEM css methodology to organize your code.
0 - @0xabdulkhaliqPosted over 1 year ago
Hello there π. Congratulations on successfully completing the challenge! π
- I have other recommendations regarding your code that I believe will be of great interest to you.
QR iMAGE ALT TEXT πΈ:
- The QR Code Component involves scanning the QR code, the image is not a decoration, so it must have an
alt
attribute which should explain the purpose of theimage
.
- The
alt
withqr_code
is not even explaining for what the QR image need to be used.
- So update the
alt
with meaningful text which explains likeQR code to frontendmentor.io
- Example:
<img src="/images/image-qr-code.png" alt="QR code to frontendmentor.io">
.
I hope you find this helpful π Above all, the solution you submitted is great !
Happy coding!
0 - @OluwalolopePosted over 1 year ago
Hey, Great work completing the challengeπ. I have a few suggestions
-
Don't use Pixels for Font-Sizing: Pixels are absolute values. They do not vary, if a visually impaired person is trying to go through your site they may need to increase the font size in their browser settings, but that is where the problem comes in. The reader won't be able to increase the font size of the text if it is in pixel. That will affect the user experience. It is best to use
rem
instead ofpx
for fonts. With rem you give the power over to the user to adjust the sizing of texts to make it readable. By default1px = 0.0625rem
. In your code I noticed you used 15px for the paragraph. Instead use 15 * 0.0625= 0.9375rem -
Your CSS Code is clean but I'll advise you to add comments to your code to make it easier to understand what each code is for
-
Then it is often considered best practice to use BEM notation for CSS sheets : To find out more on BEM check this site BEM 101
Once again Congratulations on completing the challenge. I hope you found this helpful π
Happy codingπ¨βπ»
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