This is a solution to the Interactive rating component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Note: Delete this note and update the table of contents based on what sections you keep.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Select and submit a number rating
- See the "Thank you" card state after submitting a rating
- Solution URL: source code
- Live Site URL: website
- Semantic HTML5 markup
- TailwindCSS
- Flexbox
- CSS Grid
- Mobile-first workflow
- BEM
- CUBE CSS
- Aligning flow items in an individual grid square
- Aligning flow items in all grid squares
- Aligning a grid
- CUBE CSS - Grouping
-
Difference between aling-items and align-content in CSS Grid - This allowed me to differentiate between aligning items(align-items) in a grid square and aligning the whole grid (align-content). It also went into how to align inside a single grid square.
-
Aspect ratio - Allowed me to only provide a width for the rating circles, and the height was calculated automatically
-
tabindex - used to indicate that an element can be focused.
-
Get the Index of a Child node using JavaScript - the main highlight of the article is on indexes, but what I found really usedful is the Array.from() static method that allowed me to use highter order functions on an array consisting of HTML elements.
- Frontend Mentor - @SilvanosEric