With the direction property value set to right-to-left, the start of the child elements in the inline direction is changed from left to right, and this also affects the scroll-margin-inline-start property.
In this example, snap position is set to end in the inline direction. To put a margin of 20px where the snap position is, when direction value is right-to-left, margin must be put on start of child element.