Skip to main content
Solved

Strokes included in layout not working

  • February 23, 2024
  • 5 replies
  • 859 views

Hello everybody, just starting learning Figma and following the autolayer tutorial. Some how when I apply “Included in lay out” option on the avatars layout it doesn’t work. All the avatars have outside stroke. It’s maybe a bug or what am I doing wrong. Thank you

Best answer by Haroll

Hi @Gonzalo_Rivera

I may have a theory about it

TL;DR

Make the component 💠Avatar an auto layout and then change it strokes to Included in Advanced auto layout settings


Explaination

I cannot see how the component Avatar was built but I’m assuming that there is a rectangle inside it that contain both the image and the border, and that’s the problem.

What you’re trying to do is to tell the auto layout Avatars that you want the stroke of its children to be included in its frame size.
While there are strokes in you component, their width were not included in the component’s size and thus cannot be included in the Frame above. That’s why you need to included them in the 💠Avatar as mentioned in the TL;DR part

NB: As a general advice, you may want to let your main component (the one with this symbol : 💠) outside of your design and only use instance of it inside (the others with this symbol : 🔹). It will be easier to go back to it and it will prevent unwanted deletion

View original
This topic has been closed for replies.

5 replies

y_toku
Figmate
  • Community Support
  • 2545 replies
  • February 26, 2024

Hey there,

Thanks for reaching out. It seems there is not ongoing about this issue on our end. Could you please share the file link with view-access? We can take a closer look to investigate!

Thanks!
Toku


Haroll
  • Active Member
  • 273 replies
  • Answer
  • February 26, 2024

Hi @Gonzalo_Rivera

I may have a theory about it

TL;DR

Make the component 💠Avatar an auto layout and then change it strokes to Included in Advanced auto layout settings


Explaination

I cannot see how the component Avatar was built but I’m assuming that there is a rectangle inside it that contain both the image and the border, and that’s the problem.

What you’re trying to do is to tell the auto layout Avatars that you want the stroke of its children to be included in its frame size.
While there are strokes in you component, their width were not included in the component’s size and thus cannot be included in the Frame above. That’s why you need to included them in the 💠Avatar as mentioned in the TL;DR part

NB: As a general advice, you may want to let your main component (the one with this symbol : 💠) outside of your design and only use instance of it inside (the others with this symbol : 🔹). It will be easier to go back to it and it will prevent unwanted deletion


Thanks a lot Haroll, that was the problem, made the Avatar component a layout and problem solved. Best wishes


Sabrina_Ham

I’m having a similar issue except in a component with variants. Adding auto layout to have strokes included at each variant and at the component level doesn’t seem to work


Aliaksei_Harbouski


Hey, everybody. I have a similar problem, the component doesn’t want to include stroke in layout. I tried rebuilding the component, nothing helps.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings