Responsive Recipe App challenge (tried to get it as pixel perfect)
Design comparison
Solution retrospective
Yet again challenging myself to make it pixel perfect or as close as it can be thanks to my friend @DarkstarXDD I focused on responsiveness and made it look good in all devices
What challenges did you encounter, and how did you overcome them?box model figuring out how media queries work or at least basics of them
What specific areas of your project would you like help with?if someone can tell me when its optimal to use rem and em and when to use plain old pixels
Community feedback
- @Bamo-D-AbdallahPosted 4 months ago
rem
is good when you want your property size to increase or decrease based on the root element<html>
, so things likefont-size
should definitely be inrem
, and in general if you are not sure what to use you can always fallback torem
as it is more predictable thanem
and other units.Use
em
when you want your element to increase or decrease based on its ownfont-size
property, so when you have an element that you want itsmargin
to increase when you increase thefont-size
to make sure the content is still readable you can useem
on themargin
, or when you useletter-spacing
andword-spacing
you want the space to increase when thefont-size
is also increased, that way when you increase the size of the font everything around it will adjust themselves based on thefont-size
to preserve the original design.Never use
px
, I can't think of an example that you would ever needpx
, even for@media (min-width)
use eitherrem
orem
(doesn't matter which one you use).Marked as helpful1@AReactDeveloperPosted 4 months ago@Bamo-D-Abdallah very helpful tips thank you so much also our names are smillar ur is Abdallah im Abdelhak nice to meet you thank you for the very much needed explanation
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord