Design comparison
Solution retrospective
Hardest part by far was deploying, if anyone has any recommendations on how I can make my code cleaner please don't hesitate to comment
Community feedback
- @correlucasPosted about 2 years ago
👾Hi Roman, congratulations on your solution!
Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:
1.You've done the design for the wrong image, when you download the starter files the folder comes with 3 files (preview card, desktop and mobile) you've created the solution based on the
preview
and you should consider only themobile + desktop images
.Remove thebackground-color
from the container and add it to thebody
to make sure this color background will display it full screen.2.Add the website favicon inserting the svg image inside the
<head>
.<link rel="icon" type="image/x-icon" href="./images/favicon-32x32.png">
3.Use units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but all sizes as well.IMPROVE YOUR WORKFLOW
using VSCODE you can code your whole page usingpx
and then in the end use a plugin called px to rem here's the link → https://marketplace.visualstudio.com/items?itemName=sainoba.px-to-rem to do the automatic conversion or use this website https://pixelsconverter.com/px-to-remHere's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR
✌️ I hope this helps you and happy coding!
Marked as helpful1@r0mankeysPosted about 2 years ago@correlucas
Thank you so much for your feedback I found it very easy to concise and easy to understand, I really appreciate you taking the time to review and comment on my code and I'll definitely use your advice going forward
0 - @VCaramesPosted about 2 years ago
Hey @r0mankeys, some suggestions to improve you code:
- You HTML code currently not structure properly and a lot of the elements you used are not being used properly. To better structure your content and make it a lot clearer, you want to implement Semantic HTML.
Why use Semantic HTML?
- Accessibility: Semantic HTML makes webpages accessible for mobile devices and for people with disabilities as well. This is because screen readers and browsers are able to interpret the code better.
- SEO: It improves the website SEO, or Search Engine Optimization, which is the process of increasing the number of people that visit your webpage. With better SEO, search engines are better able to identify the content of your website and weight the most important content appropriately.
- Easy to Understand: Semantic HTML also makes the website’s source code easier to read for other web developers.
More Info
[https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Document_and_website_structure] (https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Document_and_website_structure)
https://www.freecodecamp.org/news/semantic-html5-elements/
https://dev.to/poulamic/writing-semantic-html-3436
- When you use images/icons, you want to include an Alt text tag with them. Inside that Alt Tag you want to describe what the image is; they need to be readable. Assume you’re describing the image/icon to someone.
If the image/icon is decorative, then you will leave the Alt tag blank; alt=“”
-
To make CSS Variables (:root) easier to deal with, you can give them custom names, like "--background-"color, "button-color", etc...
-
To make you content accessible to your users, it is a best to use rem/em instead of px for your CSS property values. For media queries, I definitely suggest using em for them. By using px your assuming that every users browser (mobile, tablet, laptop/desktop) is using a font size of 16px (this is the default size on browser). Em's will help with users whose default isn't 16px, which can sometimes cause the your content to overflow and negatively affect your layout.
More Info:
https://betterprogramming.pub/px-em-or-rem-examining-media-query-units-in-2021-e00cf37b91a9
Happy Coding!
Marked as helpful0@r0mankeysPosted about 2 years ago@vcarames
Thank you so much for your feedback, I was struggling width screen size and basically forgot about relative measurements, and I definitely need to work on improving my website structure so thank you for pointing it out. I will definitely be using your advice in future projects!
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