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:
committed by
Oluwaseun Olorunsola
parent
67477dcc59
commit
da5e90a429
@@ -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;
|
||||
|
@@ -1,4 +1,2 @@
|
||||
import './index.scss';
|
||||
|
||||
export * from './editor';
|
||||
export * from './layout';
|
||||
|
@@ -1,3 +1 @@
|
||||
import './index.scss';
|
||||
|
||||
export * from './header';
|
||||
|
@@ -1,5 +1,3 @@
|
||||
import './index.scss';
|
||||
|
||||
export { EditorNotices } from './notices';
|
||||
export { EditorSnackbars } from './snackbars';
|
||||
export { SentEmailNotice } from './sent-email-notice';
|
||||
|
@@ -1,4 +1,2 @@
|
||||
import './index.scss';
|
||||
|
||||
export * from './preview-dropdown';
|
||||
export * from './send-preview-email';
|
||||
|
@@ -1,4 +1,2 @@
|
||||
import './index.scss';
|
||||
|
||||
export * from './block-compatibility-warnings';
|
||||
export * from './sidebar';
|
||||
|
@@ -1,3 +1 @@
|
||||
import './index.scss';
|
||||
|
||||
export * from './styles-sidebar';
|
||||
|
@@ -1,4 +1,2 @@
|
||||
import './index.scss';
|
||||
|
||||
export * from './select-modal';
|
||||
export * from './template-selection';
|
||||
|
@@ -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";
|
||||
|
Reference in New Issue
Block a user