An issue with the padding using Plugin API

Hi Penpot community,

I’m building a plugin that manages color palette, and I’m struggling with the Boards I generate using the Plugin API.

As you can see in the attachment, the padding left and right is inverted. When clicking the button to show the padding, they are inverted once more, and the issue is resolved.

Clipboard-20250522-134953-709

Here is the code snippet I used to configure the padding:

const flex = tagWithIndicator.addFlexLayout()
flex.dir = 'row'
flex.horizontalSizing = 'fit-content'
flex.verticalSizing = 'fit-content'
flex.columnGap = 4
flex.alignItems = 'center'
flex.rightPadding = 2
flex.leftPadding = 8
flex.verticalPadding = 2

The Boards are pretty complex, with a lot of flexible items, depending on the number of color shades.
I can share my document if you need a deeper investigation.

Good catch! That’s a bug. We’ll probably fix it along with this other one.

1 Like

Haha @myfunnyandy,
For the next time, I will report the bugs on Github :grinning_face_with_smiling_eyes:

1 Like

yeah, our bug support is definitely better there :slight_smile: