@Stroudy
Posted
Well done on getting this far! You’re clearly putting in the effort, and it shows. Just a few things I noticed that could enhance your solution…
Place variables in :root { }
for global access, ensuring consistent usage throughout the stylesheet, rather than limiting them to the body
element, which restricts their scope.
body {
--color-white: hsl(0, 0%, 100%);
--color--stone: hsl(30, 54%, 90%);
--color-Stone1: hsl(30, 18%, 87%);
--color-text: hsl(30, 10%, 34%);
--color-Stone3: hsl(24, 5%, 18%);
--color-title : hsl(14, 45%, 36%);
--color-instruction : hsl(332, 51%, 32%);
--color-background : hsl(330, 100%, 98%);
--background-color: var(--color-background);
}
-
The
justify-content: center;
on your main is not doing anything because its being centered by youralign-items: center;
, -
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 a naming convention like BEM (Block, Element, Modifier) is beneficial because it makes your CSS more organized, readable, and easier to maintain. BEM helps you clearly understand the purpose of each class, avoid naming conflicts, and create reusable components, leading to a more scalable codebase. For more details BEM,
-
This does not matter that much at this stage but something to be mindful of for SEO(Search Engine Optimisation),
<meta>
description tag missing that helps search engine determine what the page is about, Something like this<meta name="description" content="" />
Great job taking the time to learn! Your efforts are paying off, and I hope these insights guide you to even more success. Keep pushing forward, and remember, you’ve got this! Enjoy your coding adventures! 💪