Working on adding some styling to columns in editor: three columns for desktop, two for tablet and one for mobile like on the frontend, but no luck yet using:
/* Desktop: Three columns */
.editor-styles-wrapper .wp-block-cover .block-editor-block-list__block.wp-block-column {
display: flex;
flex: 1 1 calc(33.333% - 20px);
}
/* Tablets: Two columns */
@media (max-width: 1024px) {
.editor-styles-wrapper .wp-block-cover .block-editor-block-list__block.wp-block-column {
flex: 1 1 calc(50% - 20px);
}
}
/* Mobile: One column */
@media (max-width: 767px) {
.editor-styles-wrapper .wp-block-cover .block-editor-block-list__block.wp-block-column {
flex: 1 1 100%;
}
}
at resources/styles/editor.css
. I also tried adding
add_action('enqueue_block_assets', function () {
if(is_admin()) {
bundle('editor')->enqueue();
}
}, 100);
to setup.php
even though I am using bud.conf.js
with:
...
/**
* Application assets & entrypoints
*
* @see {@link https://bud.js.org/reference/bud.entry}
* @see {@link https://bud.js.org/reference/bud.assets}
*/
app
.entry('app', ['@scripts/app', '@styles/app'])
.entry('editor', ['@scripts/editor', '@styles/editor'])
.assets(['images']);
...
without any success. I do not see my styles added when I check editor.min.css in console log nor do I see it elsewhere, but perhaps I am looking in the wrong area?
I did briefly get
TypeError: null is not an object (evaluating '(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)(`core/notices`).createInfoNotice')
in blob:https://cafejpcoen.test/91cb02e5-d0d6-4af6-bd95-723fc2e44d11
related to
/ Execute the module function
/******/ try {
/******/ var execOptions = { id: moduleId, module: module, factory: __webpack_modules__[moduleId], require: __webpack_require__ };
/******/ __webpack_require__.i.forEach(function(handler) { handler(execOptions); });
/******/ module = execOptions.module;
/******/ execOptions.factory.call(module.exports, module, module.exports, execOptions.require);
/******/ } catch(e) {
/******/ module.error = e;
/******/ throw e;
/******/ }
but not sure if these issues are related