Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 2 years ago

Interactive Rating Component | HTML/CSS | JAVASCRIPT

Cornflakes•290
@CornflakesPlus
A solution to the Interactive rating component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hey there! How is life treating you?

This was a nice fun challenge. The most difficult part was customizing the Radio buttons, tricky and unorthodox. I would love to know your feedback about:

  1. How to properly make a CSS reset?
  2. How to properly use comments?
  3. How much time should this project be completed take? 3hours? 3days? From a professional perspective.
  4. When should I start taking level 3 challenges, intermediate? This is my second javascript challenge, I've completed one newbie and Junior .

Thanks in advance, guys!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Mukwende•1,370
    @mukwende2000
    Posted about 2 years ago

    First of all the label attribute you gave the input is not valid html. so it has no effect, the label is actually an html element that you can use to give a description to your input so it is supposed to be used like so

    <label for="username">Username</label>
    <input id="username">
    

    This will connect the input to the label, the 'for' attribute provided will look for any element that has an id matching the value of its for attribute. CSS resets vary depending on your preference, the most common one i have seen is just

    *, 
    *:before,
    *:after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    }
    

    This tells css to match every element in the dom and give it those styles, but you can customize your reset the way you want as you grow as a developer.

    Comments are used to explain code that might not be clear at a glance, so make sure to add comments only you need to; if your code is self explanatory, you don't need to comment it, again if you find yourself writting too many comments, its a sign you need to refactor your code. The time it takes differs from dev to dev depending on your level, a pro developer, and i wouldn't encourage asking how long a project should take lest you get discouraged.

    This is my personal opinion, i believe the best way to not only learn but grow is to do challenging staff, things that scare you, if you run away from those, then how are you goin to become better, it is by getting stuck, frustrated, and banging your head against the keyboard that you get to learn and grow, hope that was helpful. Have a great day.

    Marked as helpful
  • Mukwende•1,370
    @mukwende2000
    Posted about 2 years ago

    Not sure what your reason was but it is recommended to use classes for styling. I will say yes and no, the projects are not real world in the sense that you will not be hired just to build a simple card component. On the other hand they are indeed real world because the things you will be building might be big projects but are a combination of small little things like the card you built and other projects on frontend mentor. By building these little projects, you won't get stuck when you find that a little part of the big app you are building comperises one of these little thing, so i would yes and no at the same time. As of other places, there is frontend masters which has much big projects. I have not done any there though.

  • Cornflakes•290
    @CornflakesPlus
    Posted about 2 years ago

    I'm having issues with the label tag here, can anyone suggest a fix to this?

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub