Frontend Mentor is a website where front-end developers get a design and are asked to make it into a page to practice their skills. This repository is my approach for the following design: https://www.frontendmentor.io/challenges/results-summary-component-CE_K6s0maV
If you want to see this repository live you can do it here: https://avoscanemile.github.io/Test_Summary
The website generates a new score every time you press continue or reload the page.
- This class styles the upper section of the card, providing a background and text color to create a visual distinction.
- It makes the main heading stand out with a larger font size and a bold font weight.
- The circular shape and gradient background create an eye-catching result circle.
- The large font size and increased font weight emphasize the result value.
- The circle's dimensions and alignment make it visually appealing.
- This class enhances the result value with a larger font size and bold font weight for emphasis.
- Styling for the result percentage text, making it visually appealing and readable.
- It styles the result adjective, providing a cohesive look to the result section.
- Adds styling to the result description for a clean and readable appearance.
- This section's styling includes display, width, and padding to achieve the desired layout.
- It styles the section title with the chosen text color, font size, and font weight.
- Utilizes flex properties for alignment and spacing within the summary section.
- The padding and border-radius enhance the section's appearance.
- These classes provide color-coded styling to differentiate sections within the summary.
- Style different aspects within the summary section, giving each its own visual identity.
- Styling for the score values, ensuring they are clear and readable.
- Enhances the numerical values within the summary section for clarity.
- Styles the "Continue" link to make it visually distinct and encourages user interaction.
- Used for arranging items within the
card,card__resultandcard__summarysections, providing a flexible, responsive layout.
In this project, various CSS functions are employed to achieve specific styling effects. Here's an overview of the CSS functions and their purposes:
- Purpose: Used for defining colors.
- Example:
hsl(0, 100%, 67%)is applied to create the light red color used as the background for the result section.
- Purpose: Used for defining colors with transparency.
- Example:
hsla(0, 100%, 67%, 0.1)sets the light red background with some transparency.
- Purpose: Enables the use of CSS variables to maintain consistency in color and typography.
- Example: Variables like
--light-redand--dark-gray-blueare used throughout the project to define colors and maintain a consistent style.
- Purpose: Ensures that the card width is responsive and adapts to different screen sizes.
- Example:
clamp(300px, 90vw, 720px)is applied to set the width of the card, ensuring it doesn't get too narrow or too wide on different screens.
- Purpose: Creates gradient backgrounds.
- Example: Used for creating gradient backgrounds in various sections, such as the result section and the "Continue" button.
- Purpose: Defines colors with hue, saturation, lightness, and alpha (transparency) components.
- Example:
hsla(256, 72%, 46%, 1)is applied for the violet-blue color in the result section.
- Stacks the
cardsections vertically for smaller screens, improving mobile user experience. - Adapts spacing and alignment of the
summary__titlefor better readability. - Adjusts the margin of the "Continue" link for an improved user interface.
The JavaScript code in this project is well explained and concise. Please refer to the script.js file for more info about it. There's also a little secret inside it.