With the direction property value set to right-to-left, the end of the child elements in the inline direction is changed from right to left, and this also affects the scroll-margin-inline-end property.
In this example, snap position is set to start 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 at the end of the child elements.