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
Request failed with status code 502
Not Found
Not Found
Not Found
Not Found

Submitted

Result Summary Component with responsive using pure CSS (mobile first)

@DepartureLV

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


The circle with the score (which is not at the center of the circle) is hard to deal with. I found that using var to fix the height and width of the circle is not a good approach since I can't know the final height of the score text. If I increase the font size, the circle may turn out to be oval because the text cannot fit in the var height, resulting in stretching the circle in a vertical direction.

If you know the best practice for this case, please let me know.

Thank you in advance 😊

Community feedback

@MaximilianoDanielGarcia

Posted

Hi Nattawat, good job!

In response to your question, You should remove padding and gap properties from your .score-container. And if you want to create a perfect circle you can do it using aspect-ratio: 1/1;

Pro tip: There exists a browser extension called Perfect Pixel that allow you overlay and compare with the design image.

I hope these was helpful to you. Happy new year!

Marked as helpful

1

@DepartureLV

Posted

@MaximilianoDanielGarcia Thank you, Happy New Year to you too πŸŽ‰

0

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