Reset default margin and set default padding-left

Because we want to have the best user experience for most of email client,
we reset the margin and set padding-left for the same look.
[MAILPOET-5645]
This commit is contained in:
Jan Lysý
2023-11-09 17:34:45 +04:00
committed by Rostislav Wolný
parent 60fd4b6c8a
commit 2ca611bacb
2 changed files with 27 additions and 0 deletions

View File

@ -54,6 +54,22 @@
.edit-post-visual-editor__content-area {
display: block; // Override flex to achieve height follow the length of the document
// Because block editor uses .has-background class after setting a background color
// we want to reset margin and padding for this class to avoid unexpected spacing
.has-background {
margin: 0;
padding: 0;
}
// Set default padding-left to have consistent default look in editor and in email
// This also overrides the default values in browsers for padding-inline-start
ul,
ol,
ul.has-background,
ol.has-background {
padding-left: 40px;
}
}
// For the WYSIWYG experience we don't want to display any margins between blocks in the editor

View File

@ -36,6 +36,17 @@ p {
margin: 13px 0;
}
ul,
ol,
li {
margin: 0;
}
/* Wa want ensure the same design for all email clients */
ul,
ol {
padding-left: 40px;
}
/* https://www.emailonacid.com/blog/article/email-development/tips-for-coding-email-preheaders */
.email_preheader,
.email_preheader * {