001-qr-code-component - HTML, CSS custom properties, CSS Flexbox
Design comparison
Solution retrospective
Vertical centering of the card in the browser window can be done by setting the body's height to 100vh
and declaring it a flexbox container. Flexbox items with margin: auto
are centered both horizontally and vertically within the container.
CSS variables with a global scope can be declared in a pseudo :root
element.
:root {
--white: hsl(0, 0%, 100%);
}
Customization of default CSS values for all elements can be done as follows:
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
What challenges did you encounter, and how did you overcome them?
The figma design file was inspected to check paddings, line heights and word spacings. Although these spacing values were adopted in my implementation, there is still a small vertical offset between the card text in my implementation vs. the frontendmentor.io solution.
Community feedback
- @Chiwanza16Posted about 2 months ago
well done the design and the solution is on point
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