I’m trying to nest all of my CSS imports into the editor-styles-wrapper class in editor.css so that I have all of our custom styles displaying in the block editor, without interfering with the rest of the admin area.
it outputs as that verbatim and isn’t actually importing anything. It seems you can’t nest whole imports inside of class wrappers in app.css anymore either, although I have seen others saying they have done it before.
Is there perhaps a setting that needs tweaked, or should I open a GitHub issue about this?
Yes, Sage 10 with bud.js uses PostCSS. You need to use a PostCSS plugin to do what you’re describing — that’s not something that’s just supported out of the box by using PostCSS. Are you expecting that to work without a plugin?
Ah, I had done it like that before on another platforms that came bundled with PostCSS and nesting an import in a class worked. That other one must have been pre-bundled with a plugin that made it work!
I was just going off Log1x suggestion of doing it that way but it seems he was using bud-sass which is likely the difference.
For the sake of anyone else who tries searching for the same terms I was searching for - where it didn’t pull up those 2 results - another thing I did try was changing this in the setup.php.
add_action('enqueue_block_editor_assets', function () {
bundle('editor')->enqueue();
bundle('app')->enqueue();
}, 100);
This does not necessarily work, because even though it says “enqueue_block_editor_assets” it does it for the whole editor and not just the editor content entry box on the left, so typography was messing with things outside of the box still.
Thank you Ben, your first link contained the right combination of what I was looking for. Instead of just dropping a link I’ll post the snippet here for extra search-ability:
add_action('after_setup_theme', function () {
add_theme_support('editor-styles');
add_editor_style(asset('app.css'));
});