Interactive Pricing Component - Built with CSS Grid & JavaScript
Design comparison
Solution retrospective
Hi everyone! 👋
Finally wrapping up this interactive pricing component challenge. Used mostly Grid and some CSS Flexbox for this one. Also swapped some color values for accessibility.
Stying this range was something else! Wild that browsers are so different for this type of form input. I've included links in my Readme to resources I found useful for styling the range and creating a radio button switch.
Happy Coding!
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there 👋. Congratulations on successfully completing the challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
JAVASCRIPT 🟡:
- The way you declared variables are need to be well structured and organized
- Take a look at the following example code which describes a better way of declaring variables to have a well structured code
const firstName = "Your"; const lastName = "Name"; const emailAddress = "[email protected]"; const password = "supersecret";
- instead try this,
const firstName = "Your", lastName = "Name", emailAddress = "[email protected]" ••• ••• // n number of declarations password = "supersecret"; // make sure to add a semicolon at end of last declaration
- This single line declaration with separated commas will helps you to have a better structured code and improves readability though
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
0
Please log in to post a comment
Log in with GitHubJoin 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