@Alex-Archer-I
Posted
Hi! Well done =)
I see that you use em
for paddings and margins and px
for fonts. Although such values like em
and rem
are primarily intended for fonts cos they depends on user's font settings.
Also I recommend you to use rem
instead of em
. You see, rem
depends directly on the root
element while em
- on the parent element. It could lead to reducing of the sizes of nested elements.
By the way, very neat work! Happy coding =)
Marked as helpful
@porumbachanov
Posted
@Alex-Archer-I Thanks for the helpful explanation! I didn't make much of a difference between em
and rem
before, now I know xD. Pushed the changes.
@Alex-Archer-I
Posted
@Vrondir
Yeah, em
could be tricky value. Better to use it when you're 100% sure it's exactly what you need =)
Also I can recommend you to learn about css-variables and start to use them - primarily for colors but sometimes for sizes as well. They looks like this:
:root {
--white: hsl(0, 0%, 100%);
}
main {
background-color: var(--white);
}
It'll be incredibly helpful in future big projects =)
@porumbachanov
Posted
@Alex-Archer-I Yeah, I'm aware of css custom properties, didn't really find the need to use them up till now because I was dealing with two or three colors. However, I am gonna use them in the recipe-page project cuz there are like eight colors in there. Thanks for the heads up tho!
@Alex-Archer-I
Posted
@Vrondir Oh, sorry, sometimes it's hard to say who is at what level =)
@porumbachanov
Posted
@Alex-Archer-I No worries, I'm here to learn after all, just trynna pass the first learning path so I get used to the platform :).