Reformat SCSS files using WP prettier

[MAILPOET-6370]
This commit is contained in:
Rostislav Wolny
2025-01-14 13:00:57 +01:00
committed by Oluwaseun Olorunsola
parent 013dd6aad8
commit 8e6c81ae75
8 changed files with 359 additions and 352 deletions

View File

@ -1,185 +1,188 @@
@import '~@wordpress/base-styles/colors'; @import "~@wordpress/base-styles/colors";
.spinner-container { .spinner-container {
align-items: center; align-items: center;
display: flex; display: flex;
height: 100%; height: 100%;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
} }
// Fix editor width. We don't use resizable editor wrapper so we need to set the width manually here // Fix editor width. We don't use resizable editor wrapper so we need to set the width manually here
.editor-visual-editor > div { .editor-visual-editor > div {
width: 100%; width: 100%;
} }
#mailpoet-email-editor { #mailpoet-email-editor {
.editor-header__toolbar { .editor-header__toolbar {
flex-grow: 1; flex-grow: 1;
} }
.editor-header__center { .editor-header__center {
flex-grow: 3; flex-grow: 3;
} }
} }
// Specific styles for the component EmailTypeInfo // Specific styles for the component EmailTypeInfo
// Styles are based on the Block Card component from Gutenberg block editor // Styles are based on the Block Card component from Gutenberg block editor
.mailpoet-email-sidebar__email-type-info { .mailpoet-email-sidebar__email-type-info {
.components-panel__row { .components-panel__row {
align-items: flex-start; align-items: flex-start;
} }
.mailpoet-email-type-info__icon { .mailpoet-email-type-info__icon {
flex: 0 0 24px; flex: 0 0 24px;
margin-left: 0; margin-left: 0;
margin-right: 12px; margin-right: 12px;
} }
.mailpoet-email-type-info__content { .mailpoet-email-type-info__content {
flex-grow: 1; flex-grow: 1;
margin-bottom: 4px; margin-bottom: 4px;
h2 { h2 {
font-size: 13px; font-size: 13px;
line-height: 24px; line-height: 24px;
margin: 0 0 4px; margin: 0 0 4px;
} }
span { span {
font-size: 13px; font-size: 13px;
} }
p:last-child { p:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.mailpoet-email-type-info__content_heading { .mailpoet-email-type-info__content_heading {
display: flex; display: flex;
div:last-child { div:last-child {
margin-left: auto; margin-left: auto;
margin-right: -8px; margin-right: -8px;
margin-top: -6px; margin-top: -6px;
} }
} }
} }
.mailpoet-settings-panel__preheader-text { .mailpoet-settings-panel__preheader-text {
margin-top: 9px; margin-top: 9px;
} }
.mailpoet-email-editor__settings-panel { .mailpoet-email-editor__settings-panel {
.mailpoet-settings-panel__richtext { .mailpoet-settings-panel__richtext {
border: 1px solid var(--wp-components-color-gray-600, #949494); border: 1px solid var(--wp-components-color-gray-600, #949494);
border-radius: 2px; border-radius: 2px;
box-shadow: transparent 0 0 0; box-shadow: transparent 0 0 0;
display: block; display: block;
min-height: 80px; min-height: 80px;
padding: 9px 11px; padding: 9px 11px;
width: 100%; width: 100%;
} }
.mailpoet-settings-panel__personalization-tags-button.components-button.has-icon { .mailpoet-settings-panel__personalization-tags-button.components-button.has-icon {
display: inline-block; display: inline-block;
height: 14px; height: 14px;
line-height: 14px; line-height: 14px;
padding: 0 5px; padding: 0 5px;
span { span {
height: 11px; height: 11px;
} }
} }
.mailpoet-settings-panel__subject .components-base-control__label { .mailpoet-settings-panel__subject .components-base-control__label {
width: 100%; width: 100%;
.components-external-link { .components-external-link {
float: right; float: right;
} }
} }
.mailpoet-settings-panel__help { .mailpoet-settings-panel__help {
margin-bottom: 20px; margin-bottom: 20px;
.components-text { .components-text {
color: #757575; color: #757575;
} }
} }
.mailpoet-settings-panel__preview-text .components-base-control__label { .mailpoet-settings-panel__preview-text .components-base-control__label {
width: 100%; width: 100%;
} }
.mailpoet-settings-panel__preview-text-length { .mailpoet-settings-panel__preview-text-length {
color: $black; color: $black;
display: inline-block; display: inline-block;
float: right; float: right;
padding: 3px; padding: 3px;
} }
.mailpoet-settings-panel__preview-text-length-warning { .mailpoet-settings-panel__preview-text-length-warning {
color: $alert-yellow; color: $alert-yellow;
} }
.mailpoet-settings-panel__preview-text-length-error { .mailpoet-settings-panel__preview-text-length-error {
color: $alert-red; color: $alert-red;
} }
} }
.edit-post-visual-editor { .edit-post-visual-editor {
line-height: 1.4; /* Recommended line-height that is also used in the email editor */ line-height: 1.4; /* Recommended line-height that is also used in the email editor */
margin: 0; margin: 0;
min-height: 100%; min-height: 100%;
padding: 0; padding: 0;
-webkit-text-size-adjust: 100%; /* From MJMJ - Automatic test adjustment on mobile max to 100% */ -webkit-text-size-adjust: 100%; /* From MJMJ - Automatic test adjustment on mobile max to 100% */
-ms-text-size-adjust: 100%; /* From MJMJ - Automatic test adjustment on mobile max to 100% */ -ms-text-size-adjust: 100%; /* From MJMJ - Automatic test adjustment on mobile max to 100% */
word-spacing: normal; word-spacing: normal;
} }
.visual-editor__email_layout_wrapper { .visual-editor__email_layout_wrapper {
height: 100%; height: 100%;
margin: 0 auto; margin: 0 auto;
padding: 0; padding: 0;
width: 100%; width: 100%;
} }
.visual-editor__email_content_wrapper { .visual-editor__email_content_wrapper {
display: flex; display: flex;
height: 100%; height: 100%;
width: 100%; width: 100%;
> div { > div {
width: 100%; width: 100%;
} }
// Fix for mobile preview height // Fix for mobile preview height
&.is-mobile-preview { &.is-mobile-preview {
> div { > div {
display: block !important; display: block !important;
} }
.editor-styles-wrapper { .editor-styles-wrapper {
height: auto !important; height: auto !important;
} }
} }
} }
// Hide the advanced settings in the sidebar. This panel is not used in the email editor at this moment. // Hide the advanced settings in the sidebar. This panel is not used in the email editor at this moment.
.block-editor-block-inspector__advanced { .block-editor-block-inspector__advanced {
display: none; display: none;
} }
// Temporary styles for Rich Text HTML comments from the PR: https://github.com/WordPress/gutenberg/pull/62128/files // Temporary styles for Rich Text HTML comments from the PR: https://github.com/WordPress/gutenberg/pull/62128/files
[data-rich-text-comment], [data-rich-text-comment],
[data-rich-text-format-boundary] { [data-rich-text-format-boundary] {
border-radius: 2px; border-radius: 2px;
} }
[data-rich-text-comment] { [data-rich-text-comment] {
background-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)); background-color: var(
--wp-components-color-accent,
var(--wp-admin-theme-color, #3858e9)
);
span { span {
color: var(--wp-components-color-accent-inverted, #fff); color: var(--wp-components-color-accent-inverted, #fff);
filter: none; filter: none;
padding: 0 2px; padding: 0 2px;
} }
} }

View File

@ -1,58 +1,60 @@
// Document actions - Component in header for displaying email/campaign title edit popup // Document actions - Component in header for displaying email/campaign title edit popup
.mailpoet-email-editor-campaign-name { .mailpoet-email-editor-campaign-name {
align-items: center; align-items: center;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
min-width: 0; min-width: 0;
.components-dropdown { .components-dropdown {
display: inline-flex; display: inline-flex;
} }
.components-button { .components-button {
min-width: 0; min-width: 0;
padding: 0; padding: 0;
} }
.mailpoet-email-campaign-name__link { .mailpoet-email-campaign-name__link {
display: inline-flex; display: inline-flex;
height: fit-content; height: fit-content;
margin-right: 10px; margin-right: 10px;
margin-top: 10px; margin-top: 10px;
} }
} }
// Document actions - Popup for editing email/campaign title // Document actions - Popup for editing email/campaign title
.mailpoet-email-editor-campaign-name__dropdown { .mailpoet-email-editor-campaign-name__dropdown {
.components-popover__content { .components-popover__content {
min-width: 280px; min-width: 280px;
padding: 0; padding: 0;
} }
.mailpoet-email-editor-email-title-edit { .mailpoet-email-editor-email-title-edit {
padding: 16px; padding: 16px;
} }
} }
.mailpoet-email-editor-save-button__dropdown { .mailpoet-email-editor-save-button__dropdown {
.components-popover__content { .components-popover__content {
min-width: 280px; min-width: 280px;
} }
} }
// We currently don't support command palette so we hide the shortcut // We currently don't support command palette so we hide the shortcut
.editor-document-bar__shortcut { .editor-document-bar__shortcut {
display: none !important; display: none !important;
} }
// Temporarily hide text about amount of changes to save. The wording is not great for email context. // Temporarily hide text about amount of changes to save. The wording is not great for email context.
.entities-saved-states__text-prompt { .entities-saved-states__text-prompt {
p { p {
display: none; display: none;
} }
} }
// Ensure checkbox controls in save panel dropdown to span the full width // Ensure checkbox controls in save panel dropdown to span the full width
.mailpoet-email-editor-save-button__dropdown .components-panel__row .components-checkbox-control { .mailpoet-email-editor-save-button__dropdown
width: 100%; .components-panel__row
.components-checkbox-control {
width: 100%;
} }

View File

@ -1,19 +1,19 @@
.components-notice.mailpoet-email-editor-validation-errors { .components-notice.mailpoet-email-editor-validation-errors {
margin: 0; margin: 0;
ul { ul {
list-style: disc outside; list-style: disc outside;
margin: 0 0 0 20px; margin: 0 0 0 20px;
} }
li { li {
margin: 8px 0; margin: 8px 0;
padding: 0; padding: 0;
} }
li:last-child { li:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
button.components-button.is-link { button.components-button.is-link {
color: #1e1e1e; color: #1e1e1e;
margin: 0 4px; margin: 0 4px;
} }
} }

View File

@ -1,103 +1,103 @@
@import '~@wordpress/base-styles/colors'; @import "~@wordpress/base-styles/colors";
.mailpoet-personalization-tags-modal { .mailpoet-personalization-tags-modal {
p:first-child { p:first-child {
margin-top: 0; margin-top: 0;
} }
.mailpoet-personalization-tags-modal__category { .mailpoet-personalization-tags-modal__category {
display: inline-block; display: inline-block;
font-size: 11px; font-size: 11px;
line-height: 16px; line-height: 16px;
padding-bottom: 8px; padding-bottom: 8px;
padding-top: 16px; padding-top: 16px;
text-transform: uppercase; text-transform: uppercase;
} }
.mailpoet-personalization-tags-modal__category-group { .mailpoet-personalization-tags-modal__category-group {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 10px;
.mailpoet-personalization-tags-modal__category-group-item { .mailpoet-personalization-tags-modal__category-group-item {
align-items: stretch; align-items: stretch;
border-bottom: 1px solid var(--wp-components-color-gray-300, #ddd); border-bottom: 1px solid var(--wp-components-color-gray-300, #ddd);
display: flex; display: flex;
padding: 16px 0; padding: 16px 0;
.mailpoet-personalization-tags-modal__item-text { .mailpoet-personalization-tags-modal__item-text {
display: flex; display: flex;
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;
font-size: 12px; font-size: 12px;
gap: 5px; gap: 5px;
justify-content: center; justify-content: center;
line-height: 18px; line-height: 18px;
} }
button.is-link { button.is-link {
flex: 0 0 auto; flex: 0 0 auto;
font-size: 14px; font-size: 14px;
height: auto; height: auto;
line-height: 2; line-height: 2;
} }
} }
} }
.mailpoet-personalization-tags-modal__menu { .mailpoet-personalization-tags-modal__menu {
div[role="group"] { div[role="group"] {
display: flex; display: flex;
} }
.mailpoet-personalization-tags-modal__menu-item-active { .mailpoet-personalization-tags-modal__menu-item-active {
color: black; color: black;
font-weight: bold; font-weight: bold;
} }
button { button {
align-items: center; align-items: center;
color: #0a7aff; color: #0a7aff;
display: flex; display: flex;
gap: 8px; gap: 8px;
padding: 6px; padding: 6px;
width: auto; width: auto;
span { span {
min-width: auto; min-width: auto;
} }
} }
.mailpoet-personalization-tags-modal__menu-separator { .mailpoet-personalization-tags-modal__menu-separator {
background-color: var(--wp-components-color-gray-700, #757575); background-color: var(--wp-components-color-gray-700, #757575);
height: 16px; height: 16px;
margin: 10px 4px; margin: 10px 4px;
width: 1px; width: 1px;
} }
} }
} }
.mailpoet-personalization-tag-popover { .mailpoet-personalization-tag-popover {
align-items: center; align-items: center;
display: flex; display: flex;
justify-content: center; justify-content: center;
.mailpoet-personalization-tag-popover__content { .mailpoet-personalization-tag-popover__content {
max-width: 350px; max-width: 350px;
min-width: auto; min-width: auto;
width: 90vw; width: 90vw;
.components-base-control { .components-base-control {
margin: 16px; margin: 16px;
} }
} }
.mailpoet-personalization-tag-popover__content-buttons { .mailpoet-personalization-tag-popover__content-buttons {
margin: 16px; margin: 16px;
text-align: right; text-align: right;
.components-button { .components-button {
margin-left: 8px; margin-left: 8px;
} }
} }
} }
a.mailpoet-email-editor__personalization-tags-link { a.mailpoet-email-editor__personalization-tags-link {
color: LinkText; color: LinkText;
cursor: pointer; cursor: pointer;
text-decoration: underline; text-decoration: underline;
} }

View File

@ -1,28 +1,28 @@
.components-modal__frame.mailpoet-send-preview-email { .components-modal__frame.mailpoet-send-preview-email {
max-width: 456px; max-width: 456px;
} }
.mailpoet-send-preview-modal-footer { .mailpoet-send-preview-modal-footer {
display: flex; display: flex;
gap: 12px; gap: 12px;
justify-content: flex-end; justify-content: flex-end;
padding-top: 16px; padding-top: 16px;
} }
.mailpoet-send-preview-modal-notice-error { .mailpoet-send-preview-modal-notice-error {
background-color: #fcf0f1; background-color: #fcf0f1;
gap: 12px; gap: 12px;
padding: 12px 16px; padding: 12px 16px;
ul { ul {
list-style: disc; list-style: disc;
margin: 0; margin: 0;
padding: 5px 0 0 20px; padding: 5px 0 0 20px;
} }
} }
.mailpoet-send-preview-modal-notice-success { .mailpoet-send-preview-modal-notice-success {
align-items: center; align-items: center;
display: flex; display: flex;
padding-top: 2px; padding-top: 2px;
} }

View File

@ -1,17 +1,17 @@
@import '~@wordpress/base-styles/colors'; @import "~@wordpress/base-styles/colors";
.background-block-support-panel .mailpoet__grid-full-width, .background-block-support-panel .mailpoet__grid-full-width,
.border-block-support-panel .mailpoet__grid-full-width { .border-block-support-panel .mailpoet__grid-full-width {
// setting the grid to 100% width because border block contains two grid columns // setting the grid to 100% width because border block contains two grid columns
grid-column: 1/3; grid-column: 1/3;
// resetting margin fits the notice to the full column width // resetting margin fits the notice to the full column width
margin: 0; margin: 0;
} }
// Disable focus outline for buttons in the sidebar // Disable focus outline for buttons in the sidebar
.edit-post-sidebar { .edit-post-sidebar {
.components-button:focus:not(:disabled) { .components-button:focus:not(:disabled) {
box-shadow: none; box-shadow: none;
outline: none; outline: none;
} }
} }

View File

@ -1,55 +1,55 @@
.mailpoet-email-editor__styles-panel { .mailpoet-email-editor__styles-panel {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
.components-panel, .components-panel,
.components-navigator-provider, .components-navigator-provider,
.components-navigator-screen { .components-navigator-screen {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
.components-navigator-screen { .components-navigator-screen {
overflow: hidden auto; overflow: hidden auto;
} }
.components-navigator-button { .components-navigator-button {
width: 100%; width: 100%;
} }
.mailpoet-email-editor__styles-header { .mailpoet-email-editor__styles-header {
margin-bottom: 0; margin-bottom: 0;
} }
.mailpoet-email-editor__styles-header-description { .mailpoet-email-editor__styles-header-description {
padding: 0 16px; padding: 0 16px;
} }
h3.edit-site-global-styles-subtitle { h3.edit-site-global-styles-subtitle {
margin-bottom: 0; margin-bottom: 0;
} }
.single-column { .single-column {
grid-column: span 1; grid-column: span 1;
} }
.edit-site-global-styles-screen-typography__indicator { .edit-site-global-styles-screen-typography__indicator {
border-radius: 3px; border-radius: 3px;
height: 2em; height: 2em;
line-height: 2em; line-height: 2em;
padding: 0; padding: 0;
width: 2em; width: 2em;
} }
.edit-site-typography-preview { .edit-site-typography-preview {
align-items: center; align-items: center;
background: #f0f0f0; background: #f0f0f0;
border-radius: 2px; border-radius: 2px;
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-bottom: 16px; margin-bottom: 16px;
min-height: 100px; min-height: 100px;
overflow: hidden; overflow: hidden;
} }
} }

View File

@ -1,44 +1,46 @@
.block-editor-block-patterns-explorer .block-editor-block-patterns-explorer
.block-editor-block-patterns-list .block-editor-block-patterns-list
.block-editor-block-preview__container { .block-editor-block-preview__container {
max-height: 300px !important; max-height: 300px !important;
} }
.block-editor-block-patterns-list__item .block-editor-block-preview__container { .block-editor-block-patterns-list__item .block-editor-block-preview__container {
align-items: flex-start !important; align-items: flex-start !important;
} }
.block-editor-block-patterns-list__list-item { .block-editor-block-patterns-list__list-item {
overflow: hidden; overflow: hidden;
} }
.email-editor-recent-templates-info { .email-editor-recent-templates-info {
background-color: #F0F6FC; background-color: #f0f6fc;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
padding: 0.5rem; padding: 0.5rem;
path { fill: #007CBA; } path {
fill: #007cba;
}
} }
.email-editor-pattern__list-item { .email-editor-pattern__list-item {
border: 1px solid #DDD; border: 1px solid #ddd;
border-radius: 4px; border-radius: 4px;
.block-editor-block-preview__container:after { .block-editor-block-preview__container:after {
outline: unset !important; outline: unset !important;
outline-offset: unset !important; outline-offset: unset !important;
} }
.block-editor-block-patterns-list__item-title { .block-editor-block-patterns-list__item-title {
font-size: unset !important; font-size: unset !important;
padding-left: 1rem; padding-left: 1rem;
} }
} }
.email-editor-modal-footer { .email-editor-modal-footer {
background-color: #fff; background-color: #fff;
bottom: 0; bottom: 0;
padding: 1rem 2rem; padding: 1rem 2rem;
position: absolute; position: absolute;
right: 0; right: 0;
} }