Created by: moso
I like to have, eg, my submit/reset buttons inside .form-group
s to group my form elements. But since every .form-group
has margin-bottom: $form-group-margin-bottom
, which is set to 1rem by default in v4 (and 15px in v3), it adds unwanted pixels in form of margin to the layout. See picture below where the unwanted pixels are marked with orange.
However, with a simple &:last-of-type
that removes the margin-bottom
on the last .form-group
, one can get rid of the unwanted addition of pixels.