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 solution using tailwind CSS and vanilla JavaScript

@YounesMakhlouf

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


I'm new to Tailwind CSS. Please don't hesitate to tell me what could be improved. Any feedback would be very appreciated and helpful. Thank youu

Community feedback

@briannelson95

Posted

Great job completing this challenge!

My suggestion for using tailwind and adding custom colors to tailwind is to use the extend function in the tailwind config.

/** @type {import('tailwindcss').Config} */
module.exports = {
    content: ["./dist/*.{html,js}"], 
    theme: {
        extend: {
            colors: {
                'rating-orange': 'hsl(25, 97%, 53%)',
                'rating-white': 'hsl(0, 0%, 100%)',
                'rating-very-dark-blue': 'hsl(216, 12%, 8%)',
                'rating-light-gray': 'hsl(217, 12%, 63%)',
                'rating-medium-gray': 'hsl(216, 12%, 54%)',
                'rating-dark-blue': 'hsl(213, 19%, 18%)',
            }
        },
    },
    }, plugins: [],
}

This will allow you to keep all of the built in color options that tailwind comes with while still being able to add custom colors

Marked as helpful

1

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