Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Enqueue /css/blocks.css with enqueue_block_assets? #36

@zgordon

Description

@zgordon

Would it make sense to break the enqueuing of the block.css file from enqueuing with wp_enqueue_scripts and enqueue it with enqueue_block_assets instead?

wp_enqueue_style( 'gutenbergthemeblocks-style', get_template_directory_uri() . '/css/blocks.css');

My thought for this approach is that if people want to apply future block styles and have them visible in the editor, they can add to the block.css file and those styles would automatically show up in the editor and not require them to add another CSS file and enqueue it with enqueue_block_assets.

I realize that this may mess things up if the code for centering non wide and full width blocks goes in this same file [https://github.com//issues/30]. However, maybe this could be moved to the style.css file as a generic styling for the frontend only?

NOTE: I may be completely missing a place where block styles for the frontend and editor would go! :) But figured it would be helpful if it doesn't already exist :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions