@aduatgit
Posted
Hey!
I really like your solution for this challenge, I think it looks great!
Regarding your question when to use rem and when to use px:
- rem is always in relation to the root element's font size of the browser, which is 16px. This can however be changed by the user, e.g. if someone wants a bigger font size because they can't really read small text.
- px will always be an absolute pixel value, this may give you more control but also removes any responsiveness for aforementioned users.
Generally this means that you are fine using rem or em for most measurements. This is especially the case for picking font sizes. If you need more control you can use px, but I don't think there are many cases where you would want to use px over other measurements. Rem and em takes a bit of getting used to, since you have to calculate all the values from base 16, e.g. 10px = 0.625rem.
Marked as helpful