• Resolved Karolina Vyskocilova

    (@vyskoczilova)


    Hi, I just tested 6.3RC2, and I am scared about all my client’s sites that use Gutenberg. enqueue_block_editor_assets hook is fired. However, the style is not loaded inside the iframe as it supposes to be. This hook is super essential – most of the time other CSS (and WP itself) CSS mess it up, or you need to add just a little bit more to be able to style UX etc. (for example different REM size or what so ever, so you can’t reuse blocks/styles CSS 1:1).

    Example working inside 6.2 but not on 6.3 (written as a two file plugin), file editor-assets-test.php

    add_action('enqueue_block_editor_assets', function () {
        wp_enqueue_style('editor-assets-test', plugins_url('style.css', __FILE__));
    }, 999);

    Content of style.css file:

    h1, h2, h3, h4 {
        color: red !important;
    }

    Don’t release it as it is right now; this is not an unbreakable change. I’ve seen already some ways to go through the issue – for example including a block with apiVersion 2 etc.

    Best regards,
    Karolina

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘enqueue_block_editor_assets’ is closed to new replies.