Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Basic HTML/CSS

@min4899

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are the best practices for font-sizing? What was the best layout for this challenge (flex, grid, etc)? How should I set up my CSS at the start for common elements (e.i. colors, fonts, spacing, etc)?

Community feedback

Danilo Blas 6,300

@Sdann26

Posted

The best you can do, is what you are doing using REM for the typography because if you want to change the size of all the letters of the device or the project, it would be enough to change the font-size. However, I do not recommend you to never put font with percentage, it will generate problems in the future depending on the devices used.

Regarding using flex or grid, personally for this design that only depends on one axis, flex looks great. Especially grid I would use it when I must layout layout, grids for cards, or large sectors of the web that depend on two axes, even for forms.

One thing I would recommend is that if you want to reset the browser styles you import a stylesheet to reset these values for example normalizer.css and place the sheet before placing your styles by hand. It will help to reset the styles in all browsers so you don't have to resort to this:

*, 
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 93.75%; /* similar to 15px*/
}

For the rest I think the project is going well, you have not had any accessibility errors and it is quite faithful to the design, keep it up!

Good Coding

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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