Design comparison
Solution retrospective
In this project, I tried the CSS in JS library, Emotion.
It is very intuitive for me to be able to write css in React components. And with the help of the facepaint
library, the syntax to handle RWD styling becomes so elegant.
What specific areas of your project would you like help with?import facepaint from 'facepaint'; const breakpoints = [450, 768]; const mq = facepaint(breakpoints.map((bp) => `@media (min-width: ${bp}px)`)); mq({ position: 'absolute', margin: ['0px', '0px 40px', '40px 0px'], padding: ['24px', '0px', '0px'], left: ['0px', '0px', '165px'] }) }
I've always struggled with handling images and I have very few experience with making landing pages. Here are some questions I'd like to ask.
-
What's the best practice to handle background image positioning for this kind of landing page? I use `` tag and position the image element with absolute positioning. But I'm not sure how people usually tackle this in real-life projects.
-
When resizing, what is the best practice to position the main content in this scenario?
-
How to ensure I detected the device correctly on first load? I'm still getting familiar with React. This time I use the
useEffect
hook, but sometimes the detected device is incorrect.
Any other comments would be appreciated. Thank you. :)
Community feedback
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