Design comparison
Solution retrospective
Here are some aspects that I am proud of:
- Building an organized structure and using the unordered list element `` to group the links together, which makes them easy to control.
- Using CSS variables for color management, which enhances maintainability and readability.
- Getting familiar with media queries, which I used several times in this project to implement responsive design and ensure the profile page looks good on various devices.
- Adding hover, focus, and active states for links, improving user interaction feedback.
As for what I would do differently next time:
I really don't know exactly, but I am open-minded to any suggestions if available.
What challenges did you encounter, and how did you overcome them?- Horizontal Scroll Issue: Initially, a horizontal scrollbar was appearing due to the use of
width: 100vw
. This was resolved by changing it towidth: 100%
. - Vertical Spacing: Adjusting the vertical padding to ensure the profile section was not too close to the top of the viewport, and maintaining consistency across different screen sizes.
I just need some review on the link states styles to ensure this approach is correct: CSS .profile .profile-info ul li a:link, .profile .profile-info ul li a:visited, .profile .profile-info ul li a:focus { background-color: var(--grey); }
.profile .profile-info ul li a:hover { background-color: var(--light-grey); }
.profile .profile-info ul li a:active { background-color: var(--green); color: var(--off-black); }
Community feedback
- @DarkstarXDDPosted 5 months ago
- Avoid using complex selectors where you use class + element name to select an element. Such as
profile .profile-info ul li a
. You can run into specificity issues as projects become larger. It also becomes harder to debug anything when the selector looks like that. Just give any element you want to style a class name and style that class.
Marked as helpful0@Mohammad-MoneerPosted 5 months ago@DarkstarXDD That's great, thank you so much 👍
0 - Avoid using complex selectors where you use class + element name to select an element. Such as
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord