Design comparison
Solution retrospective
Is It A Best Practice To Use "gap" In CSS?
While working on the project, I realized "gap" doesn't work on iPhone 6. Most people still use it and it is always advisable to design something that will be accessible to all people.
The option I had was to use "@support". I tried but couldn't implement it well so I set a margin instead.
I encountered this when styling the button - "svg" and "Add to cart". And also the "pricing".
I'd really appreciate if someone show me how I can implement the "@support" in my code. Thank You.
Community feedback
- @correlucasPosted over 2 years ago
๐พHello Joe, congratulations for your solution!
Yes,
gap
is an amazing property, but unfortunately doesn't have support in really old devices/browsers. I don't think this is something you should worry. But if you can use thepadding-bottom
approach to separate the elements that works really fine. Using padding bottom to between each element.If you like
gap
you should tryrow-gap
andcolumn-gap
for a more specific control!Hope it helps and happy coding!
Marked as helpful1
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