Social links profile | react, emotion, css custom properties
Design comparison
Solution retrospective
I really like trying out different approaches for CSS-in-JS. I think my style objects worked well, but it becomes clear that a component based approach will be necessary for larger projects to keep things simple.
What challenges did you encounter, and how did you overcome them?I used absolute positioning to center the element and I enjoyed learning a bit more about this method. But I also found it quite hard to get everything right and had to make countless small adjustments to fix inconsistencies in the design.
What specific areas of your project would you like help with?Nothing specific right now.
Community feedback
- @AchigyusPosted 6 months ago
Hi Florian.
I love your submission, your attention for details is really nice. However I noticed something.
-
On mobile, there are some gaps in the responsive design, I mean that some mobile screens don't have some padding between the edge of the screen and the social-links-card. You can check using your devtools and slowly resize down to see what I mean.
-
On desktop screens, there are horizontal and vertical scroll bars, funny thing is they don't show while the devtools tab is active, so maybe that's how you missed it. I identified the culprit code:
.css-13cezar { position: absolute; overflow: scroll; inset: 0px; min-width: 320px; min-height: 580px; width: 330px; height: 580px; margin: auto; border-radius: 1rem; background-color: var(--colors-darkgrey); display: flex; flex-direction: column; -webkit-box-pack: center; justify-content: center; }
The overflow property on your
main
tag is set to scroll, you can set it to hidden or remove it to fix the issue.Kudos for your work once again.
Marked as helpful1@ffroschPosted 6 months agoHi @Achigyus, thank you for the really helpful tips. Indeed I did not notice the scrollbars. The reason is that I use Firefox, which hides them in normal view, too. I changed it to
overflow: auto
.The missing margins were on purpose, but I realize that it can be nicer to have them on mobile, too. Will use them in the next project :-)
1 -
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