Use the full width in the email header #4905
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References:
Jira: MNTOR-3473
Figma:
Description
I was initially foiled by MJML not supporting auto-growing columns (or rather, them not being able to get that to reliably work in Outlook Desktop:
mjmlio/mjml#1669 (comment)), and thus set the right-hand column (the one containing the "Sign in" link) to 60%, hoping that that would look reasonable enough on most screen sizes — on large screens, it would be fairly right- aligned, and on smaller screens, it wouldn't be pushed to the next line.
However, the second thing that confused me was that MJML's columns don't take effect on viewport widths smaller than 480px, i.e. they're wrapped in media queries starting at that level.
If I just only test on wider viewports, then I can actually just set the columns to together span 100%. The image itself still has a fixed width of 200px, so that won't auto-grow anyway. Only downside is that the "Sign in" link will still be pushed to the next line on screens under 480px, but I guess that's just something we'll have to live with.
Screenshot (if applicable)
Before:
After:
How to test
Open an email (could be in Storybook), and resize the screen to a small width, but larger than 480px. The Monitor logo and "Sign in" link should stay on the same line.
Checklist (Definition of Done)