QR code component solution using custom properties and variable font
Design comparison
Solution retrospective
Centering div (just kidding)
Probably just not bloating stuff. Small things like separating selectors via comma and adding the necessary property to both at the same time instead of adding the same property to multiple selectors separately.
What challenges did you encounter, and how did you overcome them?Giving proper values to height, width, padding, an so on to match the design as close as possible
What specific areas of your project would you like help with?-
Should I keep using custom properties and at-rules for simple projects such as this one? Or should I ignore those for now and focus on the more basic stuff?
-
Is using
position: absolute
a good practice in cases like this? Or should I've usedflex
instead?
Community feedback
- @huyphan2210Posted 1 day ago
HI, @maneki-kakutasu
I checked out your solution and I have some thoughts:
Focus on mastering the basics before moving on to more advanced concepts. A solid foundation is key to building better solutions.
I’m not quite sure what you meant by "customer properties" and "at-rules." Could you clarify or explain further?
Deciding between
position: absolute
and Flexbox depends on the specific situation. Here are some guiding questions to help you decide:- Does this approach achieve the desired result?
- Which option is more maintainable or aligns with your familiarity?
- Does it impact other parts of the layout?
- Are there any additional considerations specific to the project?
Take on as many challenges as possible with thoughtful effort. Focus on:
- Articulating clear answers and feedback.
- Developing your own coding style and reasoning.
- Building habits that encourage deliberate thinking—an essential skill for any developer.
Hope this helps! 🚀
Marked as helpful1@maneki-kakutasuPosted 1 day agoHi, @huyphan2210!
I appreciate that you took time to help me and answer my questions.
Both terms are from MDN (Mozilla Developer Network). Honestly, wasn't really sure if I should use them myself, but here I am.
Custome properties are essentially CSS variables. You can assign specific values to them and call them later. For example:
:root { --clr-background: #000000; } div { background-color: var(--clr-background); }
At-rules are CSS statements (
@media
or@keyframes
, for example).Thank you for all the advice! Will take my time and focus on building a strong foundation instead of rushing things. Will try to question myself and articulate my thoughts in the process (definitely the area I struggle in). Again, I really appreciate your help!
1
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