Base Apparel coming soon page Using HTML, CSS & JS
Design comparison
Community feedback
- @Djamel1133Posted about 1 month ago
Hi Bro,
I'm learning from you and I follow every solution you submit. However, I have to ask you some questions:
- Why didn't you use variables for font-size and font-weight as you did for colors?
:root { /* Primary colors */ --Red: hsl(0, 78%, 62%); ... /* Font weights */ --font-weight-small: 200; ... /* Font sizes */ --font-size-small: 1rem; ... /* Spacing */ --spacing-small: 1rem; ... }
-
Why did you use
px
instead ofrem
? You could also usecalc
orclamp
for more flexibility. Check out this article: Typography in Web Design. -
Finally, I know you might not have much time, but try to comment your code. It's a good practice for you and for readers or teammates because you'll have to work with others sooner (I hope) or later.
Well done, keep learning, and happy coding!
Marked as helpful1@YacoubDweikPosted about 1 month ago@Djamel1133
Hey man!
Thanks a lot for your words we all learn from each other, regarding your questions I know that it is the right way and you are totally right, the thing is I got really exhausted haha I mean It would very easy to make the solution looks exactly like the original design but only if I have the Figma file which I don't.
So this is for variables cuz u know when I started doing these stuff I was obsessed with measurments and pixels and variables but right now I am a bit more into finishing the Newbie section and start learning React.
About the flexibilty of the font size I was just about to start learning that cuz I believe it is an amazing feature to have in your code, and ofc I will try to write more comments as they are very useful as you said!
Thanks a lot Djamel and I guess you are from North Africa if I am not wrong right?
Appricate it man!
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