Open robertpiosik opened 2 months ago
@robertpiosik Not sure I fully understand the use-case but react-sheet-slide
will add padding to the body for 2 reasons:
body
in-order to animate the backdroppaddingRight
to minimize layout shift. This is disabled on mobile which is why paddingRight
may be set to 0.This can be overridden by using using a CSS selector with more specificity like:
body:not([attr]):not([attr="value"]) {
padding: 35px !important
}
By adding the 2 attribute selectors, this style will apply consistent padding regardless of the modal state. Alternatively the padding could just be moved in a div
that is a direct child of the body which is what I would recommend. Hope this helps.
To clarify, I can't accommodate for layout shift on any child of body
. While I can set padding-left
or any other property without a problem, padding-right
gets cleared.
Hi, it's currently impossible to set scrollbar offsets on other fixed elements, padding right is somewhat cleared anytime
react-sheet-slide
sets its styles on body.