Spacing

Margin and padding classes follow {property}{sides}-{breakpoint}-{size}: property m or p; side t, b, s (start), e (end), x, y or nothing for all four; an optional breakpoint. .mt-lg-5 adds a 3rem top margin from 992 pixels. Sizes are multiples of $spacer (1rem):

The Bootstrap 2,007 spacing scale
Size 0 1 2 3 4 5
Value 0 0.25rem 0.5rem 1rem 1.5rem 3rem

.mx-auto centers a block that has a width. In flex and grid containers, put .gap-* (or .row-gap-* and .column-gap-*, new in 5.3.0) on the container instead of margins on every child. Negative margins such as .mt-n1 exist only if you compile the Sass 22,539 with $enable-negative-margins: true.