Responsive Product Preview Card using HTML, CSS (with SASS/SCSS)
Design comparison
Solution retrospective
This is my first time building a project using SASS/SCSS. I will practice using it in the next projects.
What challenges did you encounter, and how did you overcome them?- Spent a lot of time on how to organize a project structure for SASS.
- Not sure when to use mixins, how many variables to be declared.
- Using rem for font-size, paddings,...
- Building responsive layouts for desktop.
I mostly referred to other people's projects to find the solutions.
Community feedback
- @StroudyPosted about 2 months ago
Hello again fellow coder, Fantastic effort on this! You’re really nailing it. Just a few things I noticed that could make it even better…
-
Using a
<main>
tag inside the<body>
of your HTML is a best practice because it clearly identifies the main content of your page. This helps with accessibility and improves how search engines understand your content. -
This should be in lowercase
<p class="content__category">PERFUME</p>
and styled in CSS withtext-transform: uppercase;
, Keeping text lowercase in HTML improves accessibility and SEO. Usingtext-transform: uppercase;
in CSS separates content from style, ensuring screen readers interpret the text correctly. -
For future project, You could download and host your own fonts using
@font-face
improves website performance by reducing external requests, provides more control over font usage, ensures consistency across browsers, enhances offline availability, and avoids potential issues if third-party font services become unavailable. Place to get .woff2 fonts
I hope you found this advice helpful! Keep up the great work, You’re doing amazing, and I can’t wait to see what you create next. Happy coding! 🚀
0 -
- @MikDra1Posted about 2 months ago
Well done, here are some things to review 😊:
-
Overusing div tags: Try using more semantic HTML elements like
<section>
,<header>
, and<article>
. It’ll help with both accessibility and SEO. -
Neglecting responsive design: Make sure you're using media queries and following a mobile-first approach so your site looks great on all devices.
-
Inconsistent class naming: It’s easy to end up with a mess of class names. Consider using a system like BEM for better organization and scalability.
-
Using px for everything: Instead of
px
for fonts and layouts, try using relative units likerem
orem
to make your design more adaptable to different screen sizes. -
Forgetting alt text on images: Don’t skip the
alt
attribute. It’s essential for accessibility and helps search engines understand what your images are. -
Ignoring accessibility: Focus on features like keyboard navigation, contrast ratios, and ARIA labels. They make your site usable for more people.
-
Using fixed heights for elements: Setting fixed heights can cause overflow issues. Use
min-height
or allow content to expand naturally to avoid problems. -
Not using responsive images: Be sure to use
srcset
or the<picture>
element to optimize images for different devices. This improves performance, especially on mobile.
Hope you found this comment helpful 💗💗💗
Good job and keep going 😁😊😉
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