Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertical Rhythm Spike #119

Merged
merged 2 commits into from Mar 8, 2019
Merged

Vertical Rhythm Spike #119

merged 2 commits into from Mar 8, 2019

Conversation

joe-bell
Copy link

@joe-bell joe-bell commented Feb 21, 2019

Description

Our existing vertical rhythm implementation (taken from Harry) has caused more headaches than what it's worth. Instead I've implemented a solution that applies to margin-top but not the first-child. This is a lot less aggressive and less likely in need of margin: 0 overrides for the odd use-case.

Further reading: https://matthewjamestaylor.com/css-margin-top-vs-bottom

Note: This does unfortunately have a side effect of raising Emotion console errors of:

"The pseudo class ":first-child" is potentially unsafe when doing server-side rendering.

As we roll-up our own SSR in the cashier we won't need to worry about this so much, so we can safely add the ignore label. This is currently an open issue with Emotion: emotion-js/emotion#1178.

Motivation and Context

Vertical Rhythm's important and worth setting globally (see the updated docs)

How Has This Been Tested?

All tests have been updated to reflect the new changes

Screenshots

Updated spacing documentation

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing guidelines.
  • My code follows the code style of this project.
  • My code meets the A11Y Web Accessibility Checklist. If not, please add justification documentation.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@joe-bell joe-bell marked this pull request as ready for review March 7, 2019 13:14
@joe-bell joe-bell merged commit a201a47 into develop Mar 8, 2019
@joe-bell joe-bell deleted the fix/rhythm branch March 8, 2019 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants