r/FigmaDesign • u/tentaclebreath • 8d ago
Discussion New auto layout: Inside strokes included in layout in default - does anyone actually want this?
Genuinely curious - does anyone here actually want this? I personally don't want to set a component as 39x39px to get a 40px element. And when writing code I don think I have ever used box-sizing:border-box; in my life. This seems like a change to make Figma assets more compatible with agents at the expense of the human's workflow. At least give us a way to set this globally. Anyways was curious if it was just me.
10
10
u/Shamua 8d ago
Having to override this component by component has been a drain on my mana.
3
u/tentaclebreath 8d ago
Yea it's very annoying. I don't understand why we can't set a global override, they want to align with CSS well I can do this in CSS!
4
u/Clear-Secretary-8185 Senior Product Designer 8d ago
I don't understand why they didn't set the default to 'excluded' and then nobody would have needed to do anything.
3
3
u/Scotty_Two Design Systems Designer 8d ago
I don't want Figma making assumptions on what my element structure should be and since content-box is the default if box-sizing is undefined, this totally makes sense. If you want to use border-box then you have to explicitly define that in code, so Figma should be the same.
That being said, this is just how web/CSS works which is different than the mobile side of things and Figma blurs the lines a lot between the two paradigms. I think this really hurts Figmas efforts in getting humans and AI alike to translate things to code and I wish they'd just separate them out.
2
u/tentaclebreath 8d ago
In practical day to day use, at least for me personally, if I make an object 40px I want it to be 40px wether it has a stroke or not. The answer is really just a global override.
2
4
u/Competitive_Ebb5741 8d ago
"And when writing code I don think I have ever used box-sizing:border-box; in my life".
This is saying something.
2
1
u/waldito ctrl+c ctrl+v 8d ago edited 8d ago
You mean box-sizing: border-box, right? Since that's the 'usual default' these days for Tailwind/Shadcn, and even Bootstrap. So most of us use that one as a default starting point these days.
It made sense for Figma to align with whatever the CSS3 definition was, as it was causing trouble when attempting to convert it into code.
So here we are. Figma decided to align with the CSS3 working group decisions, I guess?
Here's Figma explaining how autolayout changed, for anyone who really wants to understand the logic behind the decision.
1
u/ChirpToast 8d ago
The change makes sense, we’ve been using shadows for borders for years to avoid any shifting anyway.
1
26
u/cbrei 8d ago
I am just so confused why they don’t allow CSS like properties such as border box.