Border included in the layout/ frame of an element, instead of being around it? (Like stroke: included on Figma)

Viewed 19

Hope you're all doing fine. I have a question regarding borders in CSS.

I have a button that is 48px height, but padding sets its size dynamically instead of hardcoding the 48px height value. When I give it a 2px border, the button ends up being 52px because of the extra 2px on top and bottom.

Is there a way to include border in the total height? Like border included in layout? There is a specific reason that I don't wanna lower padding with 4px in total. Maybe stack the border on top of the padding? Is this possible?

Further reading: https://forum.figma.com/t/borders-are-not-included-in-the-size-of-frames/2372

0 Answers
Related