Skip to main content
October 17, 2023
Question

Trying to build components based off of CSS box model styling

  • October 17, 2023
  • 2 replies
  • 724 views

I am trying to build a component library in Figma based off of some CSS and HTML code we are using from a new bootstrap theme. We are customizing the theme to update all of our styling across each page of our SaaS product. When I use the developer tool to inspect elements on the page, some of these specify a value for a margin. I haven’t been able to figure out how to easily replicate margins in Figma, especially when multiple layers of containers call for specific margins. The tool for creating vertical or horizontal gaps can only do one or the other, what do I do when I need a margin for both the top/bottom and the right or left sides?

This topic has been closed for replies.

2 replies

Nate_G
Power Member
October 17, 2023

You could try using auto-layouts within auto-layouts to get close to what you are looking for.

Nate G
Maria_Soliman
New Participant
February 3, 2025

Would love proper box model support in Figma! Would make handoff so much better!

I looked for a feature suggestion and the only related thing I found was a request to support negative margins: