Design comparison
Solution retrospective
Is there a standard on how to organize and name CSS? Also, sometimes my text spacing is off depending on the screen size. Is there a way to make text sizes more responsive asides from media queries?
Community feedback
- @MelvinAguilarPosted 11 months ago
Hello there ๐. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
- Avoid setting a fixed height for the component; remove
"height: 60%"
because it can cause text overflow if the content grows. On my laptop, the text overflows.
- For
width
, avoid using a percentage. Instead, usemax-width
to allow the component to adapt to different devices without the need for media queries.
- Consider using the
clamp
function in CSS forfont-size
to make the font responsive without the need for media queries.
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding!
1 - Avoid setting a fixed height for the component; remove
- @danielmrz-devPosted 11 months ago
Hello Celine!
Your solution looks awesome!
About your question:
- Another option is using the
clamp ( )
method in your coding for font-size, width, margins, padding, etc., So the designed sizes will change according to the viewport dimensions having a responsive design and will be suitable for any device layout. Hope it helps!
And Happy New Year! ๐
0@techyjcPosted 11 months ago@danielmrz-dev Interesting, seen clamp used a lot for better responsive design, alone side the minmax function. I have used it in my personal project, currently writing a Help Desk solution using PHP.
Apologies saw your comment for this solution by Celine and thought I'd reply.
2 - Another option is using the
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