Latest solutions
Responsive Intro Section with Dropdown Menu | SCSS | Flexbox | CSSGrid
#sass/scss#cube-cssSubmitted almost 3 years ago
Latest comments
- @hejkeikei@sj0n
Instead of attaching click event on all the buttons, you could just bind submit event on the form element. When submitted, the form element will contain the data binded on the name from the input element. You could then use FormData function to parse data from the form element.
You can check out my solution if you need an idea on how to solve this challenge.
[1] https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData
Marked as helpful - @koloyyee@sj0n
Before grid was available, Flexbox was used for layout and to construct components. Now that grid is widely supported, you can use either. But generally, you would use Flexbox to construct components and grid for layout depending on how complicated the layout is.
For your rating component, you should use radio-type input because with radio-type input you could only choose one option and that is suitable for this problem. Once that is done, you would use JavaScript to get the value from the input and display it.
Lastly, I recommend you to watch Kevin Powell's video on CUBE CSS which teach you how to better structure your CSS.
- @keltech18@sj0n
These days people use flexbox or grid to style responsive layout. With card component, there is not much needed to be done to ensure the component is responsive. You can check out my solution for examples.
- @keithc07@sj0n
For my solution, I use radio-type input because fundamentally that's how they works although it's a bit tricky to style them per design but it's possible.