@Stroudy
Posted
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! 🌟