Refactor .scss files import to one place

This approach is used in the Gutenberg repository.
Our original approach, where we imported styles in index files in subdirectories, was a bit fragile
because such a file might be skipped in case a component is imported directly.

[MAILPOET-6320]
This commit is contained in:
Rostislav Wolny
2024-11-14 13:38:12 +01:00
committed by Oluwaseun Olorunsola
parent 67477dcc59
commit da5e90a429
9 changed files with 20 additions and 26 deletions

View File

@@ -1,5 +1,18 @@
@import '~@wordpress/base-styles/colors';
.spinner-container {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
width: 100%;
}
// Fix editor width. We don't use resizable editor wrapper so we need to set the width manually here
.editor-visual-editor > div {
width: 100%;
}
#mailpoet-email-editor {
.editor-header__toolbar {
flex-grow: 1;

View File

@@ -1,4 +1,2 @@
import './index.scss';
export * from './editor';
export * from './layout';

View File

@@ -1,3 +1 @@
import './index.scss';
export * from './header';

View File

@@ -1,5 +1,3 @@
import './index.scss';
export { EditorNotices } from './notices';
export { EditorSnackbars } from './snackbars';
export { SentEmailNotice } from './sent-email-notice';

View File

@@ -1,4 +1,2 @@
import './index.scss';
export * from './preview-dropdown';
export * from './send-preview-email';

View File

@@ -1,4 +1,2 @@
import './index.scss';
export * from './block-compatibility-warnings';
export * from './sidebar';

View File

@@ -1,3 +1 @@
import './index.scss';
export * from './styles-sidebar';

View File

@@ -1,4 +1,2 @@
import './index.scss';
export * from './select-modal';
export * from './template-selection';

View File

@@ -1,12 +1,7 @@
.spinner-container {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
width: 100%;
}
// Fix editor width. We don't use resizable editor wrapper so we need to set the width manually here
.editor-visual-editor > div {
width: 100%;
}
@import "./components/block-editor/index.scss";
@import "./components/header/index.scss";
@import "./components/notices/index.scss";
@import "./components/preview/index.scss";
@import "./components/sidebar/index.scss";
@import "./components/styles-sidebar/index.scss";
@import "./components/template-select/index.scss";