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

Interactive Rating Component

@sprakamatis

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


Do you know any CSS tips? Feedbacks are appreciated.

Community feedback

@Enmanuel-Otero-Montano

Posted

Hello Miguel! Congratulations for your solution.

Using important is considered bad practice and your code can become difficult to maintain using important. A tip to help you not to use important.

Try to use only "classes" to give styles. Leave the "id" for the JavaScript, this for the specificity issue. In this way, most of the time you will always have the same specificity in the elements and only when you want to overwrite a style of a certain element, you apply cascading styles. I know it's a bit tedious to achieve this 100%, but try to do it for most of the elements and in any case you get by with the labels and the classes ( div.sub-container ) for example.

Documentation on cascade and inheritance

I hope I've helped.

Cheers!

Marked as helpful

1

@sprakamatis

Posted

@Enmanuel-Otero-Montano I'm taking note of this. Thank you!

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