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

Responsive-interactive-rating-component with flexbox and JavaScript

P
Shane Pinderā€¢ 190

@ShanePinderDev

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Based on a comment I received on the Slack channel about building this component without using any media queries, I decided to give it a try. I have amended the CSS file to use clamp() to avoid having to use a media query. Doing it this way used 255 lines of CSS instead of 327 lines doing it without clamp() and using a media query. I am sure I could improve the CSS so if you have any suggestions please let me know.

Community feedback

@fosteeco

Posted

Hey Great submission. The mouse over issue has to do with your CSS hover selector.

changing these css lines : .rating-number:hover, .rating-number:active { color: #fff; background-color: hsl(216, 12%, 54%); }

To this: .rating-number:hover:not(.rating-selected) { color: #fff; background-color: hsl(216, 12%, 54%); /* background-color: blue; */ }

Is a solution I came up with. I created a pull request on your repo as well if you'd like to try it out yourself. Keep up the good work!

Marked as helpful

0

P
Shane Pinderā€¢ 190

@ShanePinderDev

Posted

@fosteeco Thanks so much for this! I merged your pull request on the repo. I spent hours trying to figure it out with no luck :)! I will have to read up on the :not pseudo class.

0
Shashree Samuelā€¢ 9,260

@shashreesamuel

Posted

Hey good job completing this challenge

Keep up the good work

Your solution looks great however I think the following should be considered

  • The card needs a bit more border-radius

  • The width of the submit button is supposed to be a bit wider

  • The numbers are supposed to be centered within the circle

In terms of accessibility issues simply wrap all your content between main tags

I hope this helps

Cheers Happy coding šŸ‘

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