https://codepen.io/Saturn2888/pen/dgLyqK
body.auto, bottom, and bottom-start.
It should be left-aligned with the reference DOM node like it is in every other situation.
It looks like it's arbitrarily adding a 5px left offset:
transform: translate3d(5px, 100px, 0px)
That's by design. You can change the safe margin in the settings of the preventOverflow modifier
Just so I can help out others having the same issue:
In Popper's 3rd arg, pass in the options object with the prop like so:
new Popper(
referenceNode,
popperNode,
{
modifiers: {
preventOverflow: {
padding: 0,
},
},
}
)
From the docs:
Name | Type | Default | Description
-- | -- | -- | --
padding | number | 5 | Amount of pixel used to define a minimum distance between the boundaries and the popper. This makes sure the popper always has a little padding between the edges of its container
@FezVrasta I see the same issue when using padding: 0.
I updated my original pen to include this change:
https://codepen.io/Saturn2888/pen/dgLyqK
Wrong syntax:
@FezVrasta But why is it offset 5 pixels and not 5/2? This means that you'll get a right margin, but the popper element is flush with the left edge of its container.
Most helpful comment
Just so I can help out others having the same issue:
In Popper's 3rd arg, pass in the options object with the prop like so:
From the docs:
Name | Type | Default | Description
-- | -- | -- | --
padding | number | 5 | Amount of pixel used to define a minimum distance between the boundaries and the popper. This makes sure the popper always has a little padding between the edges of its container