weebao / interactive-rating-component-main

Home Page:https://weebao.github.io/interactive-rating-component-main/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frontend Mentor - Interactive Rating Component Solution

Table of contents

Overview

  • This is a simple interactive rating interface.

Screenshot

Links

My process

  • I wanted to try Sass and see how it is different from SCSS so I looked up the formatting and basic Sass functions.
  • I began adding HTML components and styling them right away with Sass.
  • After figuring out how to switch between the input and result menus, I worked with the buttons using JavaScript.

Challenges

  • The first challenge was how to keep the result of the rating buttons in order to display it on the result menu. I was thinking of using JavaScript to listen for onClick event and label the button with selected while unselecting the previously selected button. I figured out a better way is to use radio buttons of HTML, which is more convenient since I don't have to use JavaScript to unselect the other buttons.
  • The second challenge is how to deploy the result menu. I was thinking of creating a new HTML file for the result menu which was quite tedious but I figured out another way is to use Sass and label the result menu with display: none.

Built with

  • HTML
  • Sass
  • JavaScript

Author

About

https://weebao.github.io/interactive-rating-component-main/


Languages

Language:Sass 45.7%Language:HTML 42.0%Language:JavaScript 12.3%