@Alex-Archer-I
Posted
Hi!
You use main
and footer
correctly. As for section - small project like this isn't really need them. You can style main
as container. In bigger sites it's preferable to use article
tag, but there could be sections inside it.
And I suggest you to put google fonts links inside the head
- it'll good for page optimization.
Also use rem
instead of em
. They are more predictable =)
Good work overall, keep doing =)
Marked as helpful
@dev-paulL
Posted
@Alex-Archer-I Hi! Thank you for your feedback, good eye, I've always put the font links inside the head
, I didnt review my html before submitting this timeπ€
I like to pretend that I'm creating components that need to be integrated to a full site. Thanks, I will read more about article
.
In the "style-guide.md" they say Font size (paragraph) : 14px. But I should not use pixels. So I wrote body{font-size: 0.875rem;}
(which I learned is the lowest we can go). Is that the right technique? Then scaled the texts with em
. Should have I set everything to rem
?
@Alex-Archer-I
Posted
@dev-paulL
There is a good article about articles =)
Yeah, now I see the point of your usage of em
, but I still believe that this could play a dirty trick in bigger apps. It's just when you'll have a really complex layout (especially when you'll work with frameworks and have to create different components separately) you can easily skip the point when em
start to get it's value from another em
on the higher level. it's a bit abstract explanation, hope I put it clearly =)
And what about using rem
everywhere there is another good article (not about articles =)) I can suggest.
Marked as helpful
@dev-paulL
Posted
@Alex-Archer-I
Yes, I read about the em
rules but didn't fully understand them. Now, it makes more sense. π
I used <article>
for my next challenge.
In the second article you suggested, they say, when talking about padding:
- "This question is the root of the mental model I use. If the value should increase with the default font size, I use
rem
. Otherwise, I usepx
."
What would you personally use in these types of components/challenges?
@Alex-Archer-I
Posted
@dev-paulL
Hey, glad I could help =)
Well, I'm still on my way to properly tune my mindset for different cases =)
I'm trying to change settings and see what part of the page became looks weird. For example, small image which served as decoration for the text should grow with the font size, but big illustration probably not.
As for those challenges (especially newbie level) I take them as opportunity to practice different stuff - once I even made all with px. Guess should redo all of this now =)
Marked as helpful