[5.5] Default mail theme: Reset margins on th and td cells to fix Outlook propagation issue #21647
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.
Using the
mail::table
component and the default Mail theme, table rows rendered in Outlook appear with a 30px top and bottom margin around them, making them >60 pixel high each.This is due to the
margin: 30px auto
declaration in the.table table
selector being propagated to both.table th
and.table td
selectors.This can be fixed by resetting margins in both
.table th
and.table td
selectors without negative side-effects in other mail clients.The issue and the fix were both tested and confirmed in Outlook 2016.
Before:
After applying the fix:
I might add that there are lots more issues with the default template in Outlook 2016, as some margin declarations are blatantly ignored and would have to be replaced by paddings instead to show any effect. But this should probably be up for discussion in a different pull request.