Design comparison
Solution retrospective
Making the site responsive is one of the many improvements I am proud of having made. I want to create a challenge more quickly the next time.
What challenges did you encounter, and how did you overcome them?Well, challenges I faced were quit easy; by researching the article again and again, I managed it.
What specific areas of your project would you like help with?Well, while reading about media queries in part of the grid section, I was not able to use grid-gap and box-shadow: var(--generic-shadow). May I know why?
Community feedback
- @StroudyPosted 2 months ago
Amazing job with this! You’re making fantastic progress. Here are some small tweaks and possible solution to your problem…
-
What does your variable look like?
box-shadow: var(--generic-shadow)
-
box-shadow: 0px 0px 16px hsla(229, 6%, 66%, 0.5);
-
Break down
-
0px 0px: The shadow is centered both horizontally and vertically (no offset).
-
16px: The shadow has a soft blur effect with a 16px radius.
-
hsla(229, 6%, 66%, 0.5): The shadow color is a semi-transparent, light gray-blue.
-
The
grid-gap
property was renamed togap
in the CSS Grid specification. Whilegrid-gap
is still supported in some browsers for backward compatibility, it’s best to use gap for future-proofing your code. Try replacinggrid-gap
withgap
in your media query. -
Using
max-width: 100%
ormin-width: 100%
is more responsive than justwidth: 100%
because they allow elements to adjust better to different screen sizes. To learn more, check out this article: responsive-meaning. -
Developers should avoid using pixels (
px
) because they are a fixed size and don't scale well on different devices. Instead, userem
orem
, which are relative units that adjust based on user settings, making your design more flexible, responsive, and accessible. For more information check out this, Why font-size must NEVER be in pixels or this video by Kevin Powell CSS em and rem explained.- Another great resource for px to rem converter. -
Using
rem
orem
units in@media
queries is better thanpx
because they are relative units that adapt to user settings, like their preferred font size. This makes your design more responsive and accessible, ensuring it looks good on different devices and respects user preferences.
You’re doing fantastic! I hope these tips help you as you continue your coding journey. Stay curious and keep experimenting—every challenge is an opportunity to learn. Have fun, and keep coding with confidence! 🌟
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