Product preview card page using HTML and CSS (Sass)
Design comparison
Solution retrospective
I’m most proud of how I structured my code to be clean, semantic, and responsive, using tools like Flexbox, CSS Grid, and Sass effectively. Incorporating accessibility features like ARIA labels and ensuring responsive typography with clamp()
were significant achievements. Next time, I would focus on further optimizing my workflow by experimenting with utility-first frameworks like Tailwind CSS and exploring advanced accessibility practices to make the design even more inclusive.
One of the main challenges I faced was getting the element sizes and positions to closely match the design specifications. It required a lot of trial and error, particularly in fine-tuning padding, margins, and grid configurations. I overcame this by carefully analyzing the design, using developer tools for precise measurements, and leveraging CSS features like clamp()
and mixins in Sass to achieve better responsiveness and alignment across screen sizes. This iterative process helped me improve my attention to detail and refine my layout skills.
I would like help with further optimizing my layout and responsiveness, particularly in ensuring pixel-perfect alignment with the design across all screen sizes. Additionally, I’d appreciate guidance on improving the accessibility of my project, such as refining ARIA roles or handling focus states more effectively. Lastly, I’d love feedback on my Sass structure and mixins to see if there are ways to make my code even more modular and maintainable.
Community feedback
- @telsabate-hubPosted 1 day ago
Wow! This is really great!!! Just a small suggestion, you could create partial sass files to organize your scss code blocks. For instance, you could put all variables inside a partial file called "_variables.scss" so it is easier to maintain. Also, you may remove the type selectors in your code to lessen the value of the specificity.
For example, you may put
.product-category
only instead ofp.product-category
.By the way, I love how clean your html file is and how your screenshot matches the design screenshot.
Thank you so much and happy coding!! :)
1@VangmanawKairungPosted about 18 hours agoThank you so much for your kind words and valuable suggestions!
I really appreciate the tip about creating partial Sass files; it makes a lot of sense for better organization, especially as projects grow.
I'll definitely work on refactoring my code to remove unnecessary type selectors to reduce specificity and keep it cleaner.
I'm glad you liked the HTML structure and how it aligns with the design—it means a lot coming from you! Thanks again, and happy coding to you too! 😊
0
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