This is a solution to the Order summary card challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- See hover states for interactive elements
- Solution URL: Github repo
- Live Site URL: Visit solution
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Mobile-first workflow
It was for the most part a review. Just going through some topics I've already learned previously but have forgotten due to months without pracitce. Something I didn't know up until now, is that text-decoration is not a property affected by transition, so I had to use text-decoration-color instead.
&__cta {
@include text-button();
color: $accent-color-1;
text-decoration: underline;
text-decoration-color: $accent-color-1;
transition: all 200ms ease-in-out;
transition-property: color, text-decoration-color;
&:hover {
color: rgba($color: $accent-color-1, $alpha: 0.7);
text-decoration-color: transparent;
}
}
- text-decoration-color transition - This helped me solve the link underline transition problem.
- Website - Juan Hamilton
- Frontend Mentor - @hamilton-i7