Closed tysongach closed 4 years ago
By default, all p elements have some bottom margin, but on the home page, we were overriding that with margin: 0; - that was done using an overly-specific selector and by using the margin shorthand:
p
margin: 0;
margin
https://github.com/houndci/hound/blob/5cdb8ec492d77aa2cf4f566e3f6b17f2f389ab54/app/assets/stylesheets/pages/home/_home-objects.scss#L15-L17
This meant our margin-top-large utility class was not working.
margin-top-large
Part of this problem is what is called an ‘accidental reset’: https://css-tricks.com/accidental-css-resets/
By only setting the margin-bottom, we are only resetting the exact piece we want to reset, not all margins.
margin-bottom
By default, all
p
elements have some bottom margin, but on the home page, we were overriding that withmargin: 0;
- that was done using an overly-specific selector and by using themargin
shorthand:https://github.com/houndci/hound/blob/5cdb8ec492d77aa2cf4f566e3f6b17f2f389ab54/app/assets/stylesheets/pages/home/_home-objects.scss#L15-L17
This meant our
margin-top-large
utility class was not working.Part of this problem is what is called an ‘accidental reset’: https://css-tricks.com/accidental-css-resets/
By only setting the
margin-bottom
, we are only resetting the exact piece we want to reset, not all margins.Before
After