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
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Desktop First - Results Summary Component

@WesSno

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@Abhirocks889

Posted

Hello Wes, congratulations on completing this challenge. The result looks great and responsive. Here are some suggestions in order to improve even further:

HTML: Consider moving the inline styles to an external CSS file: Instead of using inline styles within the tag, it's better to move those styles to an external CSS file (styles.css). This separation of concerns will make the code easier to manage and maintain.

Use semantic HTML elements: While most of the elements used in the code are appropriate, there are a couple of instances where more semantic elements can be utilized. For example:

Instead of using <b> for emphasizing text, consider using <strong>. Instead of using <section> for the summary, consider using a more specific semantic element, such as <aside>, since the summary is not the main content of the page. Provide alternative text for images: Add descriptive alternative text (alt attribute) to the <img> elements. This will improve accessibility and ensure that users with visual impairments can understand the purpose of the images.

Consider organizing CSS classes and IDs: To enhance readability and maintainability, consider grouping related CSS classes and IDs together. This can help in understanding the structure and relationships between different elements in the CSS file.

CSS:

Group related CSS properties: Consider grouping related CSS properties together to enhance readability and maintainability. For example, in the .row:nth-child() selectors, you can group the background color and the font color properties.

Use more descriptive class names: While the class names used in the code are functional, using more descriptive class names can make the code easier to understand. For instance, instead of .row, you could use something like .score-row to better represent its purpose.

Organize color variables: Since you are using a :root selector to define custom color variables, it would be beneficial to organize them systematically. Group related colors together or sort them alphabetically to improve the maintainability and ease of navigation within the code.

Consider adding comments: Although your CSS code is generally self-explanatory, adding comments to explain certain sections or provide context can be helpful for future reference and collaboration.

Finally, you can consider adding some padding to the body so that in smaller viewports, the card is not attached to the left and right edges.

These suggestions should help improve the organization, maintainability, and scalability of your CSS code. Overall, you've done a great job, and with these enhancements, your code will be even more polished. Keep up the good work!

Marked as helpful

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